Open dshenderson opened 10 years ago
Since the original ticks are preserved in xaxis.rotatedTicks = ticks;
on line 76, wouldn't it be possible to patch flot to check for the existence of xaxis.rotatedTicks
in order to draw the vertical lines?
I have patched my copy flot as follows, which seems to take care of the issue:
/jquery.flot.js
Index: assets/javascript/lib/jquery/plugins/flot/jquery.flot.js
===================================================================
--- assets/javascript/lib/jquery/plugins/flot/jquery.flot.js (revision 13829)
+++ assets/javascript/lib/jquery/plugins/flot/jquery.flot.js (working copy)
@@ -2030,8 +2030,9 @@
for (var j = 0; j < axes.length; ++j) {
var axis = axes[j], box = axis.box,
- t = axis.tickLength, x, y, xoff, yoff;
- if (!axis.show || axis.ticks.length == 0)
+ t = axis.tickLength, x, y, xoff, yoff,
+ rTicks = axis.rotatedTicks || axis.ticks;
+ if (!axis.show || rTicks.length == 0)
continue;
ctx.lineWidth = 1;
@@ -2080,8 +2081,8 @@
ctx.strokeStyle = axis.options.tickColor;
ctx.beginPath();
- for (i = 0; i < axis.ticks.length; ++i) {
- var v = axis.ticks[i].v;
+ for (i = 0; i < rTicks.length; ++i) {
+ var v = rTicks[i].v;
xoff = yoff = 0;`
Seems to fix the issue.
+1 also worked for me.
+1 still works.
When labels are rotated, the vertical grid lines for the ticks are not rendered on the chart. I believe this is because of
opts.ticks = [];
on line 77.