dummzeuch 1524 Posted 11 hours ago (edited) I am using TeeChart for drawing multiple series with two different vertical axis. One set of series uses the left axis, the others use the right axis. The legend contains check boxes that allow the user to turn a series on and off. Everything works fine but there is one small problem that I can't get solved: When all series associated with one of the axis are turned off, this axis is not shown. Right Axis missing: Left axis missing: I don't want that. Both axes should always be shown, regardless of which series are visible. But I found no way to change this behavior. Any hint? Edited 10 hours ago by dummzeuch Share this post Link to post
Sherlock 666 Posted 10 hours ago Perhaps draw invisible point belonging to the axis? Share this post Link to post
dummzeuch 1524 Posted 8 hours ago (edited) 1 hour ago, Sherlock said: Perhaps draw invisible point belonging to the axis? Invisible point? You mean a point series, that is visible but does no contain any data? Or one that contains data but is set to be drawn invisibly? I thought about that, but I was really hoping that I am just missing some setting. Edited 8 hours ago by dummzeuch Share this post Link to post
Sherlock 666 Posted 8 hours ago Visible but without data, best describes what I meant. I currently don't use TChart but had to, several years ago. I remember the necessity for trickery like that to reach the expected outcome. But my brain is not good at storing code...sorry. Share this post Link to post
Die Holländer 50 Posted 8 hours ago Is it possible to use the Afterdraw event to force the axis to be visible? procedure TForm1.Chart1AfterDraw(Sender: TObject); begin if not Chart1.Axes.Left.Visible then Chart1.Axes.Left.Visible := True; if not Chart1.Axes.Right.Visible then Chart1.Axes.Right.Visible := True; end; Share this post Link to post
dummzeuch 1524 Posted 6 hours ago 1 hour ago, Die Holländer said: Is it possible to use the Afterdraw event to force the axis to be visible? procedure TForm1.Chart1AfterDraw(Sender: TObject); begin if not Chart1.Axes.Left.Visible then Chart1.Axes.Left.Visible := True; if not Chart1.Axes.Right.Visible then Chart1.Axes.Right.Visible := True; end; Interesting idea, but unfortunately it doesn't work either. I also tried to just set them visible unconditionally and tried the BeforeDrawAxes event. Share this post Link to post
dummzeuch 1524 Posted 6 hours ago (edited) Adding two empty point series, one associated with each axis, and not shown in the legend, does the trick. This still feels too much like a hack. So if anybody else has an idea... ? I used to have an account for Steema's support forum, but my credentials don't seem to work any more. Edited 6 hours ago by dummzeuch Share this post Link to post
Pat Foley 52 Posted 6 hours ago I found this Quote Pep wrote:Hi Bertrod, you can accomplish that by using : Series1.Pen.Visible:=false; This one works well. Thank you pep. at http://teechart.net/support/viewtopic.php?t=4313 Share this post Link to post
dummzeuch 1524 Posted 3 hours ago 2 hours ago, Pat Foley said: I found this at http://teechart.net/support/viewtopic.php?t=4313 Unfortunately this is basically the same hack as with empty TPointSeries, just made invisible with a different method. Share this post Link to post