A rect isn't drawing on my webview with appcelerator

« 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 Nico Verduin on 23rd March 2013
I am trying to draw text and lines on my graph. The line is drawn perfectly, but no rect.

The following code is used in the webview.

            function drawGraph() {
                 RGraph.ObjectRegistry.Clear(); // clear the registry
     // build the graph
                 line = null;
                 line = new RGraph.Line("cvs1", data);
                 // first point is in the middle of graph
                 line.original_data[0][0] = 0;
                 // Configure the chart
                 line.Set('chart.background.barcolor1', 'white');
                 line.Set('chart.background.barcolor2', 'white');
                 line.Set('chart.background.grid.color', 'rgba(238,238,238,1)');
                 line.Set('chart.colors', ['red']);
                 line.Set('chart.xaxispos', 'center');
                 line.Set('chart.linewidth', 4);
                 line.Set('chart.shadow', true);
                 line.Set('chart.filled', false);
                 line.Set('chart.hmargin', 5);
                 line.Set('chart.ylabels', false);
                 line.Set('chart.ymax', 90);
                 line.Set('chart.ymin', 0);
                 line.Set('chart.gutter.left', 40);
                 line.Set('chart.gutter.right', 0);
                 // draw the chart
           Ti.API.info('start rect');
               var rect = new RGraph.Drawing.Rect('cvs1', 100 , 100, 50, 50);
               rect.Set('fillstyle', 'rgba(0,0,0,0)');
               rect.Set('highlight.fill', 'rgba(0,0,0,0)');
               rect.Set('highlight.stroke', 'rgba(0,0,0,0)');
           Ti.API.info('einde rect');
Posted by RGraph support on 25th March 2013
Hi there,

Well you've set the color to be transparent. Ty this:

rect.Set('fillstyle', 'red');


Add a reply

« Back to message list