javascript - How to use only one element of array for xAxis in jquery.flot.js? -


I have a line chart (which has been created), which I want to internationalize and for this I have a number of xAxis labels. Languages ​​are required. [3, ["Card", "Carte" [3] ["Card", "[Help", "Hilf", "Eder"]], [3,, "Carte"]], [9, "Something like this: Help, Hilf, Eider [Separate with a comma]" Where do I pick up the element / index? "," Deschouch "," Frenchyz "]]]}

needed? And I also want that the user can change the language (such as with a selection box) and also change the label. It already works for the rest of the page that works with the global variable language , which I set on the desired language indicator.

I tried to set up a formator on xx, which had no effect:

  plot = $ .plot ($ ('# graph-bars'), Series, {... xaxis: {ticks: itemTicks, autoscaleMargin: 0.02, labelWidth: 300, labelFormatter: function (label, series) {return label [0];}}, ...}); Your  labelFormatter  in    

label The function is no longer an array, but there is a string. So just use the function like this:

  Label back Split (',') [0];  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -