The spokes are misaligned on my Rose charts

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Joseph on 14th January 2013
Using current RGraph stable dated 31st December 2012.
The John/Julie/Richard/etc. rose chart example on this page looks fine because the circle is divided into 8 segments. However, if one has a different number of segments, the spokes are not automatically aligned with the segments, even if we set the number of spokes (n) to be the same as the number of segments in rose.Set("chart.background.grid.spokes", n). See screenshot #1 (on the left) at

To have spokes strictly aligned with segments, I suggest a small hack of the RGraph.Rose.js library:
< //this.context.moveTo(this.centerx + i, this.centery);
> this.context.moveTo(this.centerx + i, this.centery);
< for (var i=num; i<360; i+=num) {
> for (var i=-90; i<360 + num; i+=num) {

See result on screenshot #2 (on the right) at
Posted by RGraph support on 14th January 2013

Seems that the alignment may be off by 90 degrees - I'll look into this.

Richard, RGraph Support
Posted by Joseph on 14th January 2013
Correct URL for the screenshots illustrating my previous message is at:
Posted by RGraph support on 14th January 2013


Add a reply

« Back to message list