-
23 Oct 2012 3:58 AM #11
Given the example above, is this recognised as a bug now?
-
23 Oct 2012 7:39 AM #12
Change your series to this:
When I do that, the lines show very normally to me. I don't think it's a bug, but I certainly think it's a bad choice for them to have fills turned on by default. I think the default should be fillOpacity=0.Code:{ title:'Today', type:'line', xField:'c0', yField:'c1', style:{stroke:'red', fillOpacity:0} }, { title:'MTD', type:'line', xField:'c0', yField:'c2', style:{stroke:'green', fillOpacity:0} }, { title:'YTD', type:'line', xField:'c0', yField:'c3', style:{stroke:'blue', fillOpacity:0} }
-
23 Oct 2012 8:40 AM #13
Actually, I think I found the source of your problems. It's that "colors:" part. According to the docs, that part is only valid for pie series, even though it's (frustratingly) defined as part of Ext.chart.series.Series. I hate it when APIs do that. Anyway, if I comment out that part and put a style:{stroke
omecolor} on each of your series, it works as expected. No need to specify fillOpacity:0.
My guess is that something in the colors config being set on a Line series confuses the code.
-
31 Oct 2012 5:45 AM #14
Mitchell, could you provide some clarification here as to whether colors should be used and whether fillopacity is now required? thx
-
31 Oct 2012 5:48 AM #15Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
Yes, colors does need to be used for the fill. For fillopacity, I do not think this is required.
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 6:08 AM #16
So the issue I had was that I was using colors as the stroke for each line on my line chart. However, specifying colors on a chart containing a line series infact creates a fill.
Would it not make more sense for the colors array to specify the stroke colors for the lines and for a fillOpacity > 0 to be set in order to display an area fill rather than have fill enabled by default?
-
31 Oct 2012 6:28 AM #17
Mitchell - The docs and how this works seems to directly contradict you.
-
31 Oct 2012 6:35 AM #18Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
fillOpacity is not required, can confirm that in 2.1.0 RC2 using the LineChart view in Kitchensink if you comment it out.
Using same view, the fill config is specified as a color attrib: '#115fa6' but if you change it to true then the colors on the chart is then required:
Code:{ xtype: 'chart', store: 'USD2EUR', background: 'white', interactions: [ { type: 'crosszoom', zoomOnPanGesture: false } ], colors : ['#115fa6'], series: [ { type: 'line', xField: 'time', yField: 'value', style: { //fill: Kitchensink.view.ColorPatterns.getBaseColors(0), fill : true, //stroke: Kitchensink.view.ColorPatterns.getBaseColors(0), //fillOpacity: 0.6, miterLimit: 3, lineCap: 'miter', lineWidth: 2 } } ], axes: [ { type: 'numeric', position: 'left', fields: ['value'], title: { text: 'USD to Euro', fontSize: 20 } }, { type: 'time', dateFormat: 'Y-m-d', visibleRange: [0, 1], position: 'bottom', fields: 'time', title: { text: 'Date', fontSize: 20 } } ] }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 6:42 AM #19
You know, I often have feature enhancements rejected because they would complicate the API too much. And yet, we get this. Quite complicated! Anyway, the docs REALLY should be updated with this stuff before it's finally released. As it stands, it claims the Series#color config is only ever used for Pie series. And it doesn't even bother to tell you what a Series#style config looks like except through examples. Examples that are wrong (I've entered bugs for that have been marked INFOREQ for some bizarre reason).
I'm not going to get mad, because this is still an RC. But I seriously hope these docs get a MAJOR update before release.
-
26 Dec 2012 11:13 AM #20
Thanks for the report! I have opened a bug in our bug tracker.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-3858
in
Sprint 30.


Reply With Quote