Threaded View

  1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    5
    Answers
    1
    Vote Rating
    0
    rolska is on a distinguished road

      0  

    Default Answered: Terminating / Stopping a Line Chart

    Answered: Terminating / Stopping a Line Chart


    I'm looking to have two individual line series on one chart. One series will have complete data while the other will be display partial data.

    I've tried stopping the partial series with null / undefined / blank string values with no luck. I'm noticing that the path of the stroke is as if the chart is still an area chart-- it colors the entire outline of the fill (even if there is no fill) and will always try to close the stroke path.

    Using 'null' / and empt datapoints:

    ChartTest.png

    Using 'undefined' datapoints:

    ChartTest2.png

    Basically, I would like to just have a single line that stops rendering if there's no y-axis data. There seems to be more discussion of this for Ext.JS but I've yet to see an answer for ST 2.1.

    Seems like this should be an easy fix but I can't find a solution! Any suggestions?

    Code:
    var config = {
     store: {
                  fields: ['name', 'data1', 'data2', 'data3', 'data4', 'data5'],
                  data: [
                      {'name':'metric one', 'data1':7, 'data2':12, 'data3':14, 'data4':8, 'data5':13},
                      {'name':'metric two', 'data1':5, 'data2':8, 'data3':16, 'data4':10, 'data5':3},
                      {'name':'metric three', 'data1':10, 'data2':2, 'data3':14, 'data4':12, 'data5':7},
                      {'name':'metric four', 'data1':'', 'data2':14, 'data3':6, 'data4':1, 'data5':23},
                      {'name':'metric five', 'data1':'', 'data2':38, 'data3':36, 'data4':13, 'data5':33}
                  ]
                },
                axes: [{
                    type: 'numeric',
                    position: 'left',
                    fields: ['data1'],
                    maximum: 20,
                    title: {
                        text: 'Sample Values',
                        fontSize: 15
                    },
                    grid: true,
                    minimum: 0
                }, {
                    type: 'category',
                    position: 'bottom',
                    fields: ['name'],
                    title: {
                        text: 'Sample Values',
                        fontSize: 15
                    }
                }],
                series: [{
                    type: 'line',
                    highlight: {
                        size: 7,
                        radius: 7
                    },
                    style: {
                        stroke: 'red',
                        lineWidth: 10,
                        dataClose: true
                    },
                    xField: 'name',
                    yField: 'data1',
                    marker: {
                        type: 'path',
                        stroke: 'blue',
                        lineWidth: 0
                    }
                }]
            };
    Last edited by rolska; 10 Dec 2012 at 8:27 PM. Reason: Added second image of chart when using "undefined" data points.

  2. The chart only currently supports a full line, it cannot have breaks in it.

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