Click to search on your search term.
Subscribe to Fig Leaf Tutorials


Need help with a project? Contact us at sales@figleaf.com.
From code reviews to project "jumpstarts" and full life-cycle development, we've got you covered!
Check out our case studies!
Follow us on Twitter!
Click here to join our Facebook group!

Ready to upgrade your skills? Try these instructor-led classes in Washington, DC:
Ext JS 6 Bootcamp
12/04/2017

Defining Multiple Chart Series

Page of 168
Use mutliple chart series to define mutiple lines on a line chart

You can define multiple series, which has the effect of superimposing one series on top of another. This technique is typically used to define line charts as illustrated by the following code snippet:

 

 

{
 xtype: 'chart',
 animate: true,
 store: store,
 axes: [
  {
   type: 'Numeric',
   position: 'left',
   fields: ['data1', 'data2'],
   label: {
    renderer: 
       Ext.util.Format.numberRenderer('0,0')
   },
   title: 'Sample Values',
   grid: true,
   minimum: 0
  },
  {
   type: 'Category',
   position: 'bottom',
   fields: ['name'],
   title: 'Sample Metrics'
  }
 ],
 series: [
  {
   type: 'line',
   axis: 'left',
   xField: 'name',
   yField: 'data1'
  },
  {
   type: 'line',
   axis: 'left',
   fill: true,
   xField: 'name',
   yField: 'data2'
  }
 ]
}
Page of 168
comments powered by Disqus