Radar chart - applying labels along ticks


« 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 Robert Jordan on 4th February 2013
Good Day,

I'm evaluating your product prior to purchase. One of my needs is the ability to place bolded labels alongside each tick for (only) the top-center spoke of a radar chart. This, of course, would represent the valid value-range (of the data) and not the legend (aka key).

Now, I "might" be able to fake it using your drawing API. However, I have yet to be successful using the drawing API against a radar-chart.

SO MY QUESTION(S) ARE:
(1) How do I place value-range labels across the top-center spoke for a radar chart?
(2) If I have to draw it explicitly, what libraries are required?

Thanks,

- Rob




Posted by RGraph support on 4th February 2013
Hi,

By the sounds of it you want the chart.labels.axes option:

radar.Set('chart.labels.axes', 'nsew');

There's no option to bold the text but you can increase the size of the texts with these options:

radar.Set('chart.text.size', 26)
radar.Set('chart.text.size.scale', 8)

Richard, RGraph Support

1 Year Premium Support now reduced to £299:
   www.rgraph.net/support
Posted by Nick on 6th March 2013
How would I remove the box around the ensuing label text ?
Also how to draw on only the one axis instead of four (up/down/left/right) ?

I am trying to achieve a really polished presentation :)
Posted by RGraph support on 6th March 2013
Hi there,

The Radar chart is getting new options for labels:

dev.rgraph.net/tests/2013-02-28/radar-labels.html

And to turn off specific axis labels you can use:

obj.Set('chart.labels.axes', 'nesw');


PS Could you link to the RGraph website - thanks.

Richard, RGraph Support

1 Year Priority Support now reduced to £299:
   www.rgraph.net/support
Posted by Nick on 6th March 2013
And the answers to my previous questions are:

To only draw on the East axis:
Line 815 in RGraph/libraries/RGraph.radar.js, remove the draw South, North and West parts.

To draw the labels without the bounding box:
In the remaining 'East' section, change the true in the following lines to false:
[BEFORE]
RGraph.Text(context, font_face, font_size, this.centerx + (r * 0.2), this.centery, RGraph.number_format(this, this.scale[0].toFixed(decimals), units_pre, units_post), 'center', 'center', true, false, color);
[AFTER]
RGraph.Text(context, font_face, font_size, this.centerx + (r * 0.2), this.centery, RGraph.number_format(this, this.scale[0].toFixed(decimals), units_pre, units_post), 'center', 'center', false, false, color);

Posted by RGraph support on 6th March 2013
Hi there,

Keep in mind that the scale and labels are changing significantly for the next release.


Richard, RGraph Support

1 Year Priority Support now reduced to £299:
   www.rgraph.net/support
Posted by Nick on 6th March 2013
Great !
And good point about code maintenance.
BTW, I didn't find the API docs at first, but have now located them here
www.rgraph.net/docs/radar.html
(I was a bit slow browsing from docs -> chart types -> radar )

Attribution request duly noted :)

Add a reply

 




« Back to message list
RGraph on social media