|
Split Color / Dashed xZoneLine Not Working |
Posted by Eddy Glaister on Mar-17-2014 17:29 |
|
Hi there,
Previously I could split a line into a solid colour up until a point, and then dashed for the
second part.
However, after putting zoom and scroll functionality in place this has stopped working - it
now displays the line as a dashed line the entire length no matter what!
I am not 100% percent sure if zoom and scroll is what has caused it, but I thought I would
mention as it may help resolve the problem!
This is my code snippet - (I put 100 as the split point for testing)
colourOfChannel = layer.xZoneColor(100, 0x333399, c.dashLineColor(0xd04040,
Chart.DashLine));
layer.addDataSet(DataArray, colourOfChannel, sName);
//create y-axis for this sensor
CreateYAxisForSensor(ref c, ref layer, axisCount, colourOfChannel); |
Re: Split Color / Dashed xZoneLine Not Working |
Posted by Peter Kwan on Mar-18-2014 00:53 |
|
Hi Eddy,
The scrolling should not affect the splitting code.
For example, consider the "Simple Zooming and Scrolling" example that comes with
ChartDirector. If I add:
int colourOfChannel = layer.xZoneColor(Chart.CTime(new DateTime(2010, 1, 1)), 0x333399,
c.dashLineColor(0xd04040,
Chart.DashLine));
layer.addDataSet(dataSeriesA, colourOfChannel, "Product Alpha");
Then the line would be solid before 2010-1-1, and dashed after it. If I scroll the chart so
that the entire x-axis is beyond 2010-1-1, then the entire line will be dashed.
(I have tried the above code myself, and it works as expected.)
In your code, the split point is at x = 100. If your entire x-axis is beyond 100 (eg. the x-axis
is shown 300 - 450), then the entire line will be dashed. If the x-axis is a date/time axis, it
is likely the entire x-axis is way above 100, so the line would be a dashed line.
If you need further help, is it possible to inform me of the complete charting part of your
code, and also chart image you obtain?
Regards
Peter Kwan |
|