Problem with drawing text

Share RGraph:   Share or Like RGraph on Facebook!

« 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 Antonio Vianello on 11th November 2013
Hi there!

When I try to draw text on a simple bar chart like this:

var x = bar.canvas.width / 2;
var y = bar.Get('') - 5;
var text = new RGraph.Drawing.Text('cvs', x, y, 'An example of the drawing API text object')
.Set('valign', 'bottom')
.Set('halign', 'center')
.Set('size', 14)
.Set('tooltips', ['The drawing API text object'])
.Set('tooltips.event', 'mousemove')
.Set('highlight.stroke', 'rgba(0,0,0,0)')

I get the following javascript error:

"Uncaught Type Error: Cannot read property 'Text' of undefined"

I correctly include all the relative libraries, expecially the drawing API, so I cannot figure out what is the problem.

Thanks in advance
Posted by RGraph Support on 11th November 2013
Hi there,

The page is saying that RGraph.Drawing is undefined - so it looks like you haven't included the drawing API. If you think you have then you might have a 404, Try going to the URL of the JavaScript file directly in your browser - eg:

Richard, RGraph Support

Add a reply

« Back to message list