1. #11
    Sencha Premium Member
    Join Date
    Sep 2012
    Posts
    36
    Vote Rating
    0
    Answers
    1
    jlawton is on a distinguished road

      0  

    Default


    Ah yes! That got it to work!! While playing with it a bit more, I noticed that as long as I gave it an id, I could use the original code you linked to, where it was calling

    Code:
    var chartId = sprite.surface.id;
    var chart = Ext.getCmp(chartId); // this works as long as I have some id defined in the chart object, even if I'm not calling it here as I was earlier.
    You can play with the final results on jsfiddle here.

    Thanks again!

  2. #12
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,099
    Vote Rating
    96
    Answers
    113
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    you can now remove the id and instead, use the "this" for accessing the series directly:

    Replace
    chart.series.items[0].items[index]
    by
    this.items[index]

    you can reduce the code a little by removing the lines related to chart's id. Also, using an id is considered bad practice. you can use component query instead.

  3. #13
    Sencha Premium Member
    Join Date
    Sep 2012
    Posts
    36
    Vote Rating
    0
    Answers
    1
    jlawton is on a distinguished road

      0  

    Default


    Is there a way to change the chart point from a point to an image? I just want to change one of the points though. (in this instance, the last one). Not sure where to look for that info. TIA.

Thread Participants: 1

Tags for this Thread