Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    22
    Vote Rating
    0
    Answers
    1
    maxycini is on a distinguished road

      0  

    Default Unanswered: Line chart not plotted if there are more than 9 line series

    Unanswered: Line chart not plotted if there are more than 9 line series


    I have the requirement of drawing more than 20 line series in the chart but
    any thing above 9 line series it stops working and i am getting the error given below

    int touch-chart.js

    getColorFromStyle: function(style) {

    if (Ext.isObject(style)) {
    return style.stops[0].color;
    }
    //if it's a gradient just return the first color stop.
    return style.indexOf('url') == -1 ? style : this.getSurface('main')._gradients[style.match(/url\(#([^\)]+)\)/)[1]].stops[0].color;Uncaught TypeError: Cannot call method 'indexOf' of undefined (repeated 31 times)



    },


  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,541
    Vote Rating
    872
    Answers
    3565
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    So if you only have 9 series no error but if you add a 10th then you get an error? Kind of an odd one. Development has moved on to Sencha Touch 2.1 where the charts are included so any bug in the Touch Charts for ST1 will not be fixed.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    22
    Vote Rating
    0
    Answers
    1
    maxycini is on a distinguished road

      0  

    Default


    Thanks for the reply.

    I feel the error was basically with the color code or style to be used.

    If you see in bar chart if i have more than nine bars it works , but only thing is after the ninth bar the color of the bar starts repeating again which is kind of confusing. So no unique color for each item.

    bar chart.png



    But for line or scatter chart it just stops working if there are more than nine series items.

    Is there any way to select random colors in bar chart instead of repetitive coloring
    Attached Images

Thread Participants: 1

Tags for this Thread