ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Can I remove vertical lines from a StepLineLayer?
Posted by Roy on Aug-30-2012 23:42
Hi,

We are using ChartDirector version 3.x.

I have a StepLine Layer rendering a dataseries on an XYChart.  The x-axis is time and y-axis is value.  The StepLineLayer is perfect because in my example on receiving a datapoint, the y-axis reading should remain constant until the next datapoint.  I looked into the LineLayer but as expected found it was drawing diagonal lines between points.

Is there any way to hide the vertical lines between steps?  Any alternative solutions most welcome.  I will need to plot four different data series on the same XYChart in this fashion.

Thank you for any help you can provide me with,

Roy

  Re: Can I remove vertical lines from a StepLineLayer?
Posted by Roy on Aug-30-2012 23:44
I should have added that I'm using C# for a web application.

R

  Re: Can I remove vertical lines from a StepLineLayer?
Posted by Peter Kwan on Aug-31-2012 01:32
Hi Roy,

Instead of using a step line layer, you would need to use a normal line layer with x and y coordinates (the y-coordinates are the data in addLineLayer, and the x-coordinates are set using Layer.setXData). The coordinates you use should be like:

double[] xData = {x1Left, x1Right, Chart.NoValue, x2Left, x2Right, Chart.NoValue, x3Left, x3Right };
double[] yData = {y1, y1, Chart.NoValue, y2, y2, Chart.NoValue, y3, y3, Chart.NoValue};

Using the above code, you can have 3 horizontal segments and no vertical segments.

Hope this can help.

Regards
Peter Kwan

  Re: Can I remove vertical lines from a StepLineLayer?
Posted by Roy on Aug-31-2012 21:31
Peter,

Thank you for replying with a solution so promptly.  I've encorporated your suggestion and the chart now has a step like display without the vertical lines. - Perfect!

I must say, I've been really impressed with the variety of charts and amount of customisation made available to the developer.

Thanks again!

Roy