Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: How to change the color of a POINT based on it's value

  1. #11
    Sencha Premium Member
    Join Date
    Sep 2012
    Posts
    37
    Answers
    1
    Vote Rating
    0
      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
    Answers
    113
    Vote Rating
    100
      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
    37
    Answers
    1
    Vote Rating
    0
      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.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •