Search code examples
linechartgraphael

Control show/hide the lines of line chart in graphael


I'd like to create 3 lines chart by graphael. And 3 check box to control show/hide these lines.

This is my code:

window.onload = function() {
    paper = Raphael(20,20, "800", "550");
    var options = {
    symbol : "circle",
    nostroke : false,
    smooth : false,
    shade : true,
    fill : "transparent",
    axis : "0 0 1 1",
    axisxstep : 11,
    axisystep : 5
};

    //line chart object
    var chart = paper.linechart(25, 25, 500, 500, [0,1,2,3,4,5,6,7,8,9,10,11], [[1,2,3,4,5,6,7,8,9,10,11,12],[10,25,53,54,14,25,86,77,28,19,11,12],[60,31,22,13,64,75,18,29,26,37,81,2]], options);


}

And I want create 3 check box to do: show/hide which line i want! In graphel I can't find what function to control sho/hide a line!

Any have solutions? thanks.


Solution

  • I think. I have a solution for you

    this I my code woked:

    Angle tag solutions for Graphael multiple line chart