Link to home
Start Free TrialLog in
Avatar of Binsky
Binsky

asked on

Inverting just the chart axis, not the data

Hi all,

I'm currently writing an application that, amongst other things, displays data in graphs. The data is received from a datalogging unit, which contains a display that also shows the data in graphs. My problem is that I need to make my software be as uniform to the hardware graph as possible, which also means that I'll need to invert the labels on some (not all) of those graphs. (I use one graph and 6 serieslists, with graph initialisation before loading in new data).

I need for the bottom axis to show numbers from 31 to 1, instead of 1 to 31. The data itself should not be inverted. I found the BottomAxis.Inverted property, but that also inverts the data. I've tried using the serieslist items, I thought that if I inverted the X values manually it should work, but that didn't change a thing...
(tempX := IntToStr(Index);
 MainForm.DataLogChart.Series[1].Add(tempY, tempX);)
I also tried the bottomaxis.maximum and minimum properties, but max can't be < min (of course)....

So I guess my question is as follows : Is there a way to manually fill the bottomaxis labels, without conflicting situations, and without changing the order of the data? Or maybe just invert the bottom axis labels?

Thanks in advance,

Robin

Avatar of Binsky
Binsky

ASKER

Hmm,

I guess noone wanted to answer this...Too little points?

Anyways, I've coded a "quick and dirty" solution myself by now...I've filled the graph's serieslist backwards, then set the inverted property to true, which looks exactly like I wanted. I was hoping for a sturdier (easier?) solution, but this works just fine, with a minimum of overhead. I'll ask for a refund, so this question can be closed...

Robin
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial