Threaded View

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


    Default 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:


    Using 'undefined' datapoints:


    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?

    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.