ChLa
asked on
Two overlapping components
Can I have two charts on my form, both overlapping, by having only one visible at a time ? At design time I would make the first chart invisible before adding the second. At run time a button would control which is visible. Both TCharts would be completely overlapping, in the same exact position. There isn't room on my form for both charts to exist at the same time.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
using TChart, you can add multiple series
when adding the first series you typically calculate the min and max values for x and y
an example: cpu usage versus number of users connected to a database
the cpu usage is from 0% to 100%
the number of users is from 0 to ???, by day about 1000, by night about 50
in the legend an indication is required of how the 2 graphs relate to each other
the cpu usage is easy > the height of the graph is the percentage > 0 to 100
for the users an estimate of 1200 max users would be 100%
example data:
cpu: 86%
actual users: 700 > value (or height) calculated in the graph: 700/1200*100=58.33%
if you make a dependency like this, it's possible to show multiple values graphs in 1 chart
typical example: average speed and altitude over distance during bike race
http://www.steema.com/gallery/mobile/23#
when adding the first series you typically calculate the min and max values for x and y
an example: cpu usage versus number of users connected to a database
the cpu usage is from 0% to 100%
the number of users is from 0 to ???, by day about 1000, by night about 50
in the legend an indication is required of how the 2 graphs relate to each other
the cpu usage is easy > the height of the graph is the percentage > 0 to 100
for the users an estimate of 1200 max users would be 100%
example data:
cpu: 86%
actual users: 700 > value (or height) calculated in the graph: 700/1200*100=58.33%
if you make a dependency like this, it's possible to show multiple values graphs in 1 chart
typical example: average speed and altitude over distance during bike race
http://www.steema.com/gallery/mobile/23#
ASKER
TPageControl looks like a great solution. Thank you.
Because my mind is telling me that this is the answer ( even though rationally it isn't ):
Creating visual components at runtime:
Open in new window
Or by setting the first chart visible at design time and then setting it to false by a button click event.