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

Message ListMessage List     Post MessagePost Message

  Y axis scale, liner, Log and power (10 or 100)
Posted by icm63 on Apr-16-2025 07:02
vb net, Chartdir 6.0

I know how to use liner and log scale for a Finance chart.

How can I use y scale Power(10) as a axis or power(100)?

Any ideas how to do this in Chart Director (in Vb) ?

Thx

  Re: Y axis scale, liner, Log and power (10 or 100)
Posted by Peter Kwan on Apr-17-2025 01:12
Hi icm63,

I assume you refer to the FinanceChart object.

By default, the FinanceChart will use linear y-axis scale. The actual scale will be automatically determined based on your actual data.

You can use FinanceChart.setLogScale to configure the y-axis to use log scale. The scale will be automatically determined based on your actual data. For example, if your data are from 15 - 159, ChartDirector may choose a log scale with the labels (10, 20, 50, 100, 200) to fit your data. The labels may or may not be a power of 10. It depends on your data. For example, if your data are from 15.6 to 15.9, the automatic labels would not be in power of 10.

If you want to use the power of 10, you need to set the scale with your own code. In this case, ChartDirector will not automatically set the scale. For example:

Dim m As FinanceChart = New FinanceChart(width)

'
' Set up chart as usual
'

' Add the main price chart
Dim priceChart as XYChart = m.addMainChart(.....)

' Set the y-axis scale
priceChart.setLogScale(1, 100, 10)



Actually, I am not too sure what you mean by "y scale Power(10)". If the above is not what you need, is it possible to provide an example of what is "y scale Power(10)"?

Best Regards
Peter Kwan