I allways need an X-Axis value at the end

Hello,

I add points to my serie with "AddSingleXYPoint". My X-Axis is set to Autounits. When my chart is shown, I see values at the X-Axis with a delta of 16, i.e. 160, 176, 192. My last point is at 198, but the next value of the X-Axis would be 208, which is not shown.

There would be two possible solutions:
1. Value 198 is shown in the X-Axis additionally.
2. I can determine the delta between the shown X-Axis values, when I added my points, and can charge, how many "invisible" points I have to add that 208 (in my example) is shown.

Is there any way in TAdvCharts for one of these solutions? Or is there another solution?

Best regards
Ulrich Kloock

Dear Mr. Andreas, 


Did you set the charttype to ctXYLine or ctXYMarker?
Did you change the RangeTo property to make sure that 208 lies within the available range?

Perhaps you could send us a sample to demonstrate this issue so we can investigate?

Kind Regards, 
Pieter

Hi Pieter,

Thank you for your fast reply. I'll try to explain, what I want to do.
In my example I get 127 values from a server, which I shall show in a chart:

Please ignore the counting error at the beginning of the X-Axis, there are some errors in the data.
But at the end of the X-Axis my last point is at X-position 226. The next value of the X-Axis would be 227, so I had to add 1 point (227, 0) to show this value.
When I build my serie, I loop over all values, I get from the server, and use AddSinglePoint for each value. At the end of this loop I would like to konw the gap between the X-Axis values and the last shown X-Axis value. Then I would be able to compute, how many "invisible" values I have to add, to show the next X-Axis value.
If I only change the RangeTo property, I get something like this:

Of course I get additional values on my X-Axis, but these values are wrong and I still do not know, how far I have to change the RangeTo property.

I use Charttype ctBar.
If you need a code sample, please let me know, I'll try to create a small sample chart for you then.

Kind regards
Andreas

Hi, 


By default the X-Axis AutoUnits are turned on, and will automatically calculate the amount of values that need to be displayed. You can turn this off and use the X-Axis MajorUnit and MinorUnit properties to determine how many values and at which steps they are drawn. If the AutoUnits are off and you set MajorUnit to 1 you should get all X-Axis values displayed.

Kind Regards, 
Pieter

Hi Pieter,

I know the possibility turning AutoUnits off, but there isn't enough space to display all values, even if I use the Angel property. And when I set MajorUnit to 2 or 4, I have the new problem that I have to calculate this value new, when I zoom my chart.
This is allways be done, when AutoUnits is on, and it would be nice, if there was a possibility to get the (automatically) calculated gap.

Kind Regards,
Andreas

Hi, 

Currently there is no functionality to retrieve this gap.
We will investigate here if we can expose this functionality.

Kind Regards, 
Pieter

Ok, I'll be hopefull and patient.

Thanks for your help though.

Kind Regards
Andreas