Problems to clear chart


« 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 Ruben on 14th February 2014
Buenos días,

Tengo un formulario que muestra el gráfico de una fecha de inicio a una fecha de fin.
Cuando selecciono 1 día, el gráfico se ve perfectamente. Si selecciono 4 días, el gráfico se muestra por encima del otro.

(Si yo refresco la pantalla no aparece, pero no me interesa refrescar pantalla).

Necesito borrar el primer gráfico para mostrar el segundo.

Estoy usando "RGraph.Clear(document.getElementById("cvs"));" pero no funciona, inicialmente se borra pero si clico encima del gráfico aparece el primer gráfico debajo del segundo gráfico.


Este es el código del gráfico que uso:

var line = new RGraph.Line("cvs", data)
         .Set('background.grid.color', '#DDD')
         .Set('colors', m_colores)
         .Set('linewidth', 1)
         .Set('labels', dia)
         .Set('tooltips', info)
         .Set('tickmarks', 'dot')
         .Set('title','Puntos')
         .Set('title.bold',false)
         .Set('title.x',25)
         .Set('title.size',9)
         .Draw();


thanks

regards
Posted by Richard on 14th February 2014
Hi there,

I only speak English I'm afraid.




Richard, RGraph Support
www.rgraph.net
Please link to the RGraph website
Posted by Ruben on 15th February 2014
Good morning ,

I have a form that displays the graph of a start date to an end date .
When I select 1 day the chart looks fine. If I select 4 days, the chart is displayed above the other .

( If I refresh the screen does not appear , but I'm not interested refresh screen).

I need to delete the first graph shows the second .

I'm using "RGraph.Clear(document.getElementById("cvs"));" but does not work initially cleared but if I click above the graph the first chart second chart below shows .


Here's the code I use the chart :

var line = new RGraph.Line("cvs", data)
          .Set('background.grid.color', '#DDD')
          .Set('colors', m_colores)
          .Set('linewidth', 1)
          .Set('labels', dia)
          .Set('tooltips', info)
          .Set('tickmarks', 'dot')
          .Set('title','Puntos')
          .Set('title.bold',false)
          .Set('title.x',25)
          .Set('title.size',9)
          .Draw();


thanks

regards
Posted by Richard on 15th February 2014
Hi there,

Instead of the RGraph.Clear() function try using the RGraph.Reset() function.





Richard, RGraph Support
www.rgraph.net
Please link to the RGraph website

Add a reply

 




« Back to message list
RGraph on social media