Results 1 to 4 of 4

Thread: Extjs multiple line charts with different number of data. Pb when setting y axis min

  1. #1
    Sencha User
    Join Date
    Feb 2016
    Posts
    2

    Default Extjs multiple line charts with different number of data. Pb when setting y axis min

    I am currently using a javascript framework Extjs 4 and I encounter a problem with line charts.

    I have a store which looks like this :


    store = Ext.create('Ext.data.JsonStore', {
    fields: ['week', 'data1', 'data2'],
    data: [
    {'week':'metric one', 'data1':'', 'data2':12},
    {'week':'metric two', 'data1':'', 'data2':8},
    {'week':'metric three', 'data1':5, 'data2':2},
    {'week':'metric four', 'data1':2, 'data2':14},
    {'week':'metric five', 'data1':'', 'data2':38}
    ]
    });

    My y axis is like this :

    type: 'Numeric',
    fields: ['data1','data2'],
    minimum: 0,
    maximum: 100,
    position: 'left',
    grid: {
    odd: {
    opacity: 0.5,
    fill: '#dddddd',
    stroke: '#777777',
    'stroke-width': 0.5
    }
    }

    and my x axis looks like :

    fields: ['week'], position: 'bottom', title: false, type: 'Category'

    This chart looks fine.

    before.PNG

    when I try to set the y axis min :


    minimum: 2

    I lose the points (in the 2nde curve) for week 1, 2 and 5 (where I have no data for curve 1) (same result for min: 1) :

    after.PNG


    I tried to set data1 to undefined, false or to remove it from the store but nothing worked.

    Thx for help !




  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Does it work better for you if you use undefined instead of an empty string for the empty values?

  3. #3
    Sencha User
    Join Date
    Feb 2016
    Posts
    2

    Default

    Hi,

    I tried to replace the empty string by undefined but it didn't solved my problem :/
    Do you have another idea?

    Thanks for your help !

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    It would help if you could post a test case so we can see what might be happening.
    https://fiddle.sencha.com/#home

Similar Threads

  1. Does Extjs charts have support for multiple y-axis?
    By mtycholaz in forum Ext: Discussion
    Replies: 5
    Last Post: 31 Oct 2013, 5:17 AM
  2. line/column charts, add a second axis
    By stetou in forum Ext: Discussion
    Replies: 3
    Last Post: 4 Oct 2013, 2:30 AM
  3. How to remove any axis line of charts
    By UpendraKumar in forum Ext: Q&A
    Replies: 1
    Last Post: 4 Jan 2013, 12:05 PM
  4. Replies: 5
    Last Post: 18 Jul 2012, 10:32 PM
  5. line Charts - different x axis coordinates
    By Franzen in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 30 Mar 2010, 4:27 AM

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
  •