-
22 Aug 2012 8:41 PM #1
Any solution to get a discrete LineSeries (or something other), i.e. with gaps?
Any solution to get a discrete LineSeries (or something other), i.e. with gaps?
Hi,
What if I need a gap within a LineSeries?
I think LineSeries cannot be discrete. So, I am just asking - is there any solution? Sure, apart from two LineSeries for one gap, three LineSeries for two gaps, etc. I need just one Series, but with gaps.
-
23 Aug 2012 12:19 PM #2
You can specify values of 'undefined' to halt the drawing of a line.
Scott.
-
23 Aug 2012 10:26 PM #3
Hi Scott,
Thanks a lot for the answer.
Previously I tried with nulls. But, anyways, I am not sure where I should specify 'undefined' to get a required gap.
Please look at the screenshot. I need a gap between 25 and 75.
2.JPG
Here is a test case. Could you clarify, please, where should I specify 'undefined' to get a gap between 25 and 75?
Test Case
Code:<html> <head> <title>Chart Gaps</title> <link type="text/css" rel="stylesheet" href="../resources/css/ext-all.css" /> <script type="text/javascript" src="../ext-all-debug.js"></script> <script type="text/javascript"> Ext.onReady(function () { Ext.create("Ext.chart.Chart", { renderTo: Ext.getBody(), height: 400, width: 400, axes: [{ position: "bottom", title: "X", fields: ["x"], type: "Numeric" }, { position: "left", title: "Y", fields: ["y"], type: "Numeric" }], series: [{ title: "LineSeries", xField: "x", yField: "y", type: "line" }], store: { fields: [{ name: "x" }, { name: "y" }], autoLoad: true, proxy: { data: [{ "x": 0, "y": 0 }, { "x": 25, "y": 25 }, { "x": 50, "y": undefined /* Where should I specify 'undefined' to get a gap between 25 and 75? */ }, { "x": 75, "y": 75 }, { "x": 100, "y": 100 }], type: 'memory' } } }); }); </script> </head> <body> </body> </html>
-
24 Aug 2012 7:15 AM #4
My mistake.. It seems that undefined only works if it is at the end as shown:
http://www.sencha.com/forum/showthread.php?233162
If the values are in the middle, the markers are omitted and the line continues.
You would most likely need to override or create a new series. I see there is a bug report for this:
http://www.sencha.com/forum/showthread.php?179292
It is slated for 4.2 release (no public date)
Regards,
Scott.
-
25 Aug 2012 11:55 PM #5
Great, thanks for the information!
-
15 Nov 2012 4:34 AM #6
-
18 Nov 2012 11:39 AM #7
This is slated for 4.2. I have noted that you would like to have null as an option.
Scott.
-
19 Nov 2012 7:48 AM #8
-
11 Dec 2012 9:46 PM #9
Hi Scott,
Re: LineSeries with gaps
Someone found out that "false" as a value produces a gap. Here are more details and a working sample.
http://www.sencha.com/forum/showthre...l=1#post920507
-
12 Dec 2012 5:18 AM #10
Good to know. Thanks for the heads up!
Scott.


Reply With Quote
