Jqplot tickOptions formatString format options

I am incredibly new to web design. What I find frustrating are the options used in the axesRendererDefaults parameters in jqplot .

According to this link :

the way to indicate how a checkmark appears on the axis (either X or Y) is determined by what is specified by the formatString: '' option formatString: '' .

What options are available for the formatString option? In the tutorial on the jqplot page, they pass parameters such as: %d , $%d and %n . How to find a complete list of available options?

Are these formatting options from jqplot and are actually a jQuery property?

+6
source share
4 answers

Format commands are similar (if not identical) to sprintf format commands.

Decent link for them http://perldoc.perl.org/functions/sprintf.html

eg. yaxis: {tickOptions: {formatString: '% .2f'}}

will output a floating point number of 2 decimal places.

+11
source

http://www.jqplot.com/docs/files/plugins/jqplot-dateAxisRenderer-js.html

Accecptable format codes:

 Code Result Description == Years == %Y 2008 Four-digit year %y 08 Two-digit year == Months == %m 09 Two-digit month ... 
+4
source

According to the official documentation: https://github.com/jqPlot/jqPlot/ in the last section: "Printf / sprintf JavaScript functions", jqplot uses "sprintf for JS"

+1
source

I believe the String format is the same as used by Highcharts, and is a subset of the PHP strftime function. Here is a link to the Highcharts doc about it.

0
source

All Articles