Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    3
    Vote Rating
    0
    KamenRiderJD is on a distinguished road

      0  

    Default Unanswered: Redraw Line chart doesn't work (touch-charts-2.0.0-beta)

    Unanswered: Redraw Line chart doesn't work (touch-charts-2.0.0-beta)


    Hi, everyone!

    I'm new in sencha touch.
    I'm trying to redraw a 'line' chart after setting new series but it doesn't work.
    (It works for 'column' and 'area' charts !)

    Code:
    var myData = [
    {name:'Name1', 2010:100, 2011:115, 2012:130},
    {name:'Name2', 2010:80, 2011:70, 2012:60},
    {name:'Name3', 2010:150, 2011:40, 2012:90}
    ];
    
    
    function createStore(){
        return Ext.create('Ext.data.Store', {
            fields: ['name', '2010', '2011', '2012'],
            data: myData
        });
    }
    
    
    var serieLine1 = [{ type: 'line', highlight: { size: 7, radius: 7 }, smooth: true, axis: 'left', xField: 'name', yField: ['2010'], title: 'toto1' }];
    
    
    var serieLine2 = [{ type: 'line', highlight: { size: 7, radius: 7 }, smooth: true, axis: 'left', xField: 'name', yField: ['2010'], title: 'toto1' },
                { type: 'line', highlight: { size: 7, radius: 7 }, smooth: true, axis: 'left', xField: 'name', yField: ['2011'], title: 'toto2' },
                { type: 'line', highlight: { size: 7, radius: 7 }, smooth: true, axis: 'left', xField: 'name', yField: ['2012'], title: 'toto3' }];
    
    
    Ext.setup({
    
    
        onReady: function() {
            var chart = Ext.create('Ext.chart.Chart', {
                theme: 'Demo',
                store: createStore(),
                animate: true,
                id: 'chartCmp',
                legend: {
                    position: {
                        portrait: 'right',
                        landscape: 'bottom'
                    },
                    labelFont: '20px Arial'
                },
                axes: [
                    {
                        type: 'Numeric',
                        position: 'left',
                        fields: ['2010'],
                        title: 'Number of Hits',
                        minimum: 0,
                        adjustMinimumByMajorUnit: 0
                    },
                    {
                        type: 'Category',
                        position: 'bottom',
                        fields: ['name'],
                        title: 'Month of the Year'
                    }
                ],
                series: serieLine1,
                interactions: [
                    {
                        type: 'panzoom',
                        axes: ['bottom', 'left']
                    }
                ]
            });
            
            Ext.create('Ext.chart.Panel', {
                id: 'panelCmp',
                fullscreen: true,
                title: 'Line',
                chart: chart
            });        
    
    
        }
    });
    It's ok. But when I try to set the new serie serieLine2 like this:
    Code:
    var chart = Ext.getCmp('chartCmp');
    chart.getAxes().items[0]._fields = ['2010', '2011', '2012'];
    chart.setSeries(serieLine2);
    chart.redraw(false);  /* or chart.refresh() */
    it doesn't work. I have this error:
    Code:
    Error
    
    • line: 4167
    • message: "'undefined' is not an object (evaluating 'this.getGroup(group).add')"
    • sourceId: 4986444928
    • sourceURL: "file:/// ... /touch-charts.js"
    I think it's because, for Line chart, chart.getSeries().drawSeries() doesn't work.

    Do you have an idea to make it possible ?

    Thanks,
    JD

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Answers
    3462
    Vote Rating
    828
    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


    I would suggest upgrading your app to ST 2.1. Touch Charts is deprecated and won't be developed on at all. ST 2.1's charts have been completely rewritten.

    Also, this forum is for the ST 1's charts.
    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
    Feb 2013
    Posts
    3
    Vote Rating
    0
    KamenRiderJD is on a distinguished road

      0  

    Default


    Oh Ok!
    I work with ST 2.1.1 (sorry for the wrong forum) but I actually use the free commercial version and chart is not included (directory src/chart is empty). So I worked with Touch Chart.

    I just take the GPL version and chart is included. I will try with this one.

    Thanks for replying.
    JD

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Answers
    3462
    Vote Rating
    828
    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


    To get the commercial version of the charts you would need to purchase Sencha Complete : https://www.sencha.com/store/sencha-complete/

    Remember, if you use GPL, you're whole application is now GPL
    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.

  5. #5
    Sencha User
    Join Date
    Feb 2013
    Posts
    3
    Vote Rating
    0
    KamenRiderJD is on a distinguished road

      0  

    Default


    I know.
    For the moment, I have to make a simple iPad application to present Sencha (especially Charts).

    Thanks

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi