1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    25
    Vote Rating
    -4
    Answers
    3
    mhmda can only hope to improve

      0  

    Default Unanswered: Charts: remove as series using chart.series.getAt(0) how?

    Unanswered: Charts: remove as series using chart.series.getAt(0) how?


    Hello how can I remove a series from a chart, I know that I can get the series object using getAt(0) or getAt(1) depending on how many serieses I got in my chart.
    my question is how can I remove a series from the chart.
    main reason is that I give the end user the ability to change the series type: bar, line... so I wan to display the new change at run time by removing the series and adding a new one.

    I tried Chart.series.removeAt(0); It removes the legend but the bar or the line still shown !!

    I use extjs 4.1.1

    thank you,

  2. #2
    Sencha Premium Member
    Join Date
    Feb 2009
    Location
    Chicago
    Posts
    4
    Vote Rating
    0
    seanl is on a distinguished road

      0  

    Default


    Maybe try:
    Code:
    chart.series.removeAt(0);
    chart.surface.removeAll();
    chart.refresh();

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    25
    Vote Rating
    -4
    Answers
    3
    mhmda can only hope to improve

      0  

    Default


    Thank you, I'll try that :-)

Thread Participants: 1