We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi guys, anyone knows how i can clear the canvas bejore y draw new graph? this is how i create new graphs
var lineChartData = { labels : mname, datasets : [ { label: "Ventas año "+ year, fillColor : "rgba(220,220,220,0.2)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#fff", pointHighlightFill : "#fff", pointHighlightStroke : "rgba(220,220,220,1)", data : array }, ] }
var ctx = document.getElementById("myChart").getContext("2d"); var myLineChart = new Chart(ctx).Line(lineChartData, { responsive: true, //bezierCurve : false, bezierCurveTension : 0.1, });
and how can i add another curve to the existing canvas?
The text was updated successfully, but these errors were encountered:
As mentioned in #559, you'd call myLineChart.destroy().
myLineChart.destroy()
Not sure I understand what you mean by adding another curve? Do you mean point?
Sorry, something went wrong.
sorry, i didnt explain myself well, but alredy solve it, i just erase the canvas and make new one before each draw
No branches or pull requests
hi guys, anyone knows how i can clear the canvas bejore y draw new graph? this is how i create new graphs
var lineChartData = {
labels : mname,
datasets : [
{
label: "Ventas año "+ year,
fillColor : "rgba(220,220,220,0.2)",
strokeColor : "rgba(220,220,220,1)",
pointColor : "rgba(220,220,220,1)",
pointStrokeColor : "#fff",
pointHighlightFill : "#fff",
pointHighlightStroke : "rgba(220,220,220,1)",
data : array
},
]
}
and how can i add another curve to the existing canvas?
The text was updated successfully, but these errors were encountered: