Question

It is very simple question, but I am stuck for 2 days and starting believe in magic. Well, I just need to simple rotate Y axis label vertical. jqPlot docs and examples say that I have to use:

labelRenderer: $.jqplot.CanvasAxisLabelRenderer

I did, but it still does not work. I even tried to copy-paste jqPlot example to my project and it does not work properly as well! And yes, I connected canvasAxisLabelRenderer.js and canvasTextRenderer.js. Here, please check my jsfiddle: http://jsfiddle.net/gu3Cr/5

UPD: Just noticed, that it doesn't work only at Chrome (ver. 34). At mozilla firefox 28 it works. But it's still a problem, because jqPlot examples work properly at Chrome.

Was it helpful?

Solution

Your example code is fine, but your JSFiddle has an issue with script references. In the Chrome console I see this:

Refused to execute script from 'https://bitbucket.org/cleonello/jqplot/raw/e8af8a37f0f14ea1e8c630ecfe6f1b1933794036/src/plugins/jqplot.canvasAxisLabelRenderer.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled. 

I removed that reference and added a link to http://cdn.jsdelivr.net/jqplot/1.0.8/plugins/jqplot.canvasAxisLabelRenderer.min.js and it works OK. See modified example here:

http://jsfiddle.net/LuQh7/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top