-
16 Oct 2012 5:22 AM #1
ST2.1 RC2 additional series line at zero
ST2.1 RC2 additional series line at zero
When adding multiple series to a chart, I get an additional horizontal line at zero for each series with no points on it.
In the image below there is actually three lines stacked horizontally on top of each other. This can be seen by disabling various series through the legend. The second image demonstrates this with just a single series left enabled.
Is this a know bug?
Library.jpg
Library_2012-10-16_14-21-45.jpg
-
16 Oct 2012 5:29 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
I'm not sure I full follow what you are saying. So you expect to have breaks in the line if they don't have points?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
16 Oct 2012 5:31 AM #3
the last charge demonstrates better with the orange line. there is one data series here yet there are two lines. the one with data points on it is the correct line. the horizontal line at zero is not one representative of my data and interestingly it has no markers either.
-
16 Oct 2012 5:39 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
Hmm... can I get a test case so I can look into why this is happening?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
16 Oct 2012 6:46 AM #5
this sample should repro the issue, however, I can't see the series rendered on there anyhow yet the scale on the axes is correct.
Code:/** * Demonstrates how use Ext.chart.series.Line */ Ext.define('Kitchensink.view.LineChart', { extend: 'Ext.Panel', requires: ['Ext.chart.Chart', 'Ext.chart.series.Line', 'Ext.chart.axis.Numeric', 'Ext.chart.axis.Time', 'Ext.chart.interactions.CrossZoom'], config: { cls: 'card1', layout: 'fit', items: [ { xtype: 'toolbar', top: 0, right: 0, zIndex: 50, style: { background: 'none' }, items: [ { xtype: 'spacer' } ] } ] }, initialize: function() { this.callSuper(); var theStore = Ext.create('Ext.data.JsonStore', { fields: [ {name: 'c0',type: 'string'}, {name: 'c1',type: 'float'}, {name: 'c2',type: 'float'}, {name: 'c3',type: 'float'} ]}); theStore.setData([ { c0: "US Equity", c1: 29896.335527252566, c2: -156889.56531551181, c3: -405990.29995779973 }, { c0: "EU Equity", c1: -44777.893132892386, c2: 286189.1549016299, c3: -386186.06253815163 }, { c0: "Asia FX", c1: -39776.369226060982, c2: -220447.05381637765, c3: 1153861.648940417 }, { c0: "Euro Credit", c1: -46908.067305063858, c2: -73255.397273812181, c3: -276510.46322496142 }, { c0: "Grexit", c1: -23797.425289544011, c2: -31672.803560119472, c3: 1829122.7015802278 }, { c0: "None", c1: 40806.24044444703, c2: 158939.14907189977, c3: -1793745.7951687956 }, { c0: "Strategy 3", c1: -42817.476947241215, c2: -204978.58454705152, c3: 1462744.0904559307 } ]); var theChart = Ext.create('Ext.chart.CartesianChart', { store: theStore, background: 'white', interactions: [{type: 'crosszoom',zoomOnPanGensture: false}], legend: { docked: 'bottom' }, axes: [{ position: 'bottom', fields: ['c0'], label: {rotate: {degrees: 90}}, title: {text: 'Strategy'}, type: 'category' }, { fields: ['c1', 'c2', 'c3'], position: 'left', title: {text: ''}, type: 'numeric' }], series: [{ title: 'Today',type: 'line',xField: 'c0',yField: 'c1' }, { title: 'MTD',type: 'line',xField: 'c0',yField: 'c2' }, { title: 'YTD',type: 'line',xField: 'c0',yField: 'c3' }] }); this.add(theChart); var toolbar = Ext.ComponentQuery.query('toolbar', this)[0], interaction = Ext.ComponentQuery.query('interaction', this)[0]; if (toolbar && interaction) { toolbar.add(interaction.getUndoButton()); } } });
-
23 Oct 2012 4:01 AM #6
any ideas on why the repro wont display at all?
-
29 Oct 2012 1:00 AM #7
-
31 Oct 2012 6:19 AM #8
working repro of problem
working repro of problem
REQUIRED INFORMATION
Ext version tested:- ST 2.1RC2
- Chrome Version 22.0.1229.94 (Windows)
- Unusual line displayed across chart at y=0.
- Replace Linechart.js in examples\kitchensink\app\view with attached
- Three lines, one for each series.
- When any series is toggled, there shoul dbe no horizontal line
- strange horizontal line at y=0
Code:/** * Demonstrates how use Ext.chart.series.Line */ Ext.define('Kitchensink.view.LineChart', { extend: 'Ext.Panel', requires: ['Ext.chart.Chart', 'Ext.chart.series.Line', 'Ext.chart.axis.Numeric', 'Ext.chart.axis.Time', 'Ext.chart.interactions.CrossZoom'], config: { cls: 'card1', layout: 'fit', items: [ { xtype: 'toolbar', top: 0, right: 0, zIndex: 50, style: { background: 'none' }, items: [ { xtype: 'spacer' } ] } ] }, initialize: function() { this.callSuper(); var theStore = Ext.create('Ext.data.JsonStore', { fields: [ {name: 'c0',type: 'string'}, {name: 'c1',type: 'float'}, {name: 'c2',type: 'float'}, {name: 'c3',type: 'float'} ]}); theStore.setData([ { c0: "US Equity", c1: 29896.335527252566, c2: -156889.56531551181, c3: -405990.29995779973 }, { c0: "EU Equity", c1: -44777.893132892386, c2: 286189.1549016299, c3: -386186.06253815163 }, { c0: "Asia FX", c1: -39776.369226060982, c2: -220447.05381637765, c3: 1153861.648940417 }, { c0: "Euro Credit", c1: -46908.067305063858, c2: -73255.397273812181, c3: -276510.46322496142 }, { c0: "Grexit", c1: -23797.425289544011, c2: -31672.803560119472, c3: 1829122.7015802278 }, { c0: "None", c1: 40806.24044444703, c2: 158939.14907189977, c3: -1793745.7951687956 }, { c0: "Strategy 3", c1: -42817.476947241215, c2: -204978.58454705152, c3: 1462744.0904559307 } ]); var theChart = Ext.create('Ext.chart.CartesianChart', { store: theStore, background: 'white', interactions: [{type: 'crosszoom',zoomOnPanGensture: false}], legend: { docked: 'bottom' }, axes: [{ position: 'bottom', fields: ['c0'], label: {rotate: {degrees: 90}}, title: {text: 'Strategy'}, type: 'category' }, { fields: ['c1', 'c2', 'c3'], position: 'left', title: {text: ''}, type: 'numeric' }], series: [{ title: 'Today',type: 'line',xField: 'c0',yField: 'c1', style: {stroke: 'red'} }, { title: 'MTD',type: 'line',xField: 'c0',yField: 'c2', style: {stroke: 'green'} }, { title: 'YTD',type: 'line',xField: 'c0',yField: 'c3', style: {stroke: 'blue'} }] }); this.add(theChart); var toolbar = Ext.ComponentQuery.query('toolbar', this)[0], interaction = Ext.ComponentQuery.query('interaction', this)[0]; if (toolbar && interaction) { toolbar.add(interaction.getUndoButton()); } } });
-
31 Oct 2012 7:22 AM #9Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
I'm not seeing any line at zero (strange horizontal line at y=0) when I toggle a series. In RC2 the lines would not disappear but in our latest code that will be GA the lines are hiding properly. With your test case I cannot reproduce any unwanted behavior by toggling series.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
31 Oct 2012 7:32 AM #10
so you dont see the blue line the red arrow points at in the image below?
2012-10-31 15_27_39-Kitchen Sink.jpg
Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.


Reply With Quote