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

Message ListMessage List     Post MessagePost Message

  setLinearScale Outside of Plot Area
Posted by Mike on Apr-15-2014 06:30
Attachments:
Hello,

I'm using setLinearScale to control the scale of the Y axis to the range -25 to 175.  After
adding data that is outside of this range, the lines drop out of the plot area and are visible
behind the X axis labels.  Is there any way to hide the lines once the drop outside of the
plot area?  I have included what I think to be all relevant code and have attached an image
of the chart to demonstrate the problem.

Dim objXYChart As New ChartDirector.XYChart(1000, 600)
Dim strXLabels As Double() = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24}

objXYChart.setPlotArea(50, 50, 900, 500)
..........

objXYChart.xAxis.setLabelStep(1)
objXYChart.xAxis.setTitle("Hours")
objXYChart.yAxis.setTitle("Price")
objXYChart.yAxis.setLinearScale(-25, 175, 25)
objXYChart.yAxis.setLabelFormat("{value|0,.-$}")

...........


Thanks for your help.
price_dashboard.png

  Re: setLinearScale Outside of Plot Area
Posted by Peter Kwan on Apr-16-2014 00:16
Hi Mike,

You can may XYChart.setClipping to clip the layers to the plot area. For example:

objXYChart.setClipping()

Hope this can help.

Regards
Peter Kwan

  Re: setLinearScale Outside of Plot Area
Posted by Mike on Apr-30-2014 00:50
Thank you.  I'll give this a try.

  Re: setLinearScale Outside of Plot Area
Posted by Mike on Apr-30-2014 00:51
That worked perfectly!  Thanks a lot!