Chart: Include Constant Lines values in Y-Axis Auto Range?

Stimulsoft Reports.NET discussion
Post Reply
Chris42
Posts: 27
Joined: Fri Aug 18, 2017 5:50 pm

Chart: Include Constant Lines values in Y-Axis Auto Range?

Post by Chris42 »

Hi,

I've noticed that when calculating the Y-Axis range on a line chart any Constant Lines are not included. This may mean that the Constant Lines are not displayed (depending on the data to be displayed).

Q: Is it possible to ensure that any Constant Lines are always displayed?

E.g. the left-hand chart auto-ranges the data but the Constant Line is off the top; value = 55. The chart on the right is nearer to how I'd like to see it.

I have managed to almost do it in event code (see the right-hand chart) but this then doesn't include the built-in clever auto-ranging logic normally used (e.g. to show all the marker values in the right-hand chart).

Thanks,
Chris
Attachments
ExampleData.mrt
(25.52 KiB) Downloaded 344 times
ExampleData.csv
(127 Bytes) Downloaded 174 times
AutoRangeShowConstantLine.png
AutoRangeShowConstantLine.png (18.13 KiB) Viewed 2432 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Chart: Include Constant Lines values in Y-Axis Auto Rang

Post by Alex K. »

Hello,

Yes, it is correct behavior.
You can set the Range for Y-Axis that Constant Line was included in this range.

Thank you.
Chris42
Posts: 27
Joined: Fri Aug 18, 2017 5:50 pm

Re: Chart: Include Constant Lines values in Y-Axis Auto Rang

Post by Chris42 »

Hi Alex,

Thanks for that. Can I just confirm: I need to manually set the range (e.g. in code) to ensure the Constant Lines are visible?

Q: in the Process Chart event, Is there a way of obtaining in code the auto-range values that would be used so I can just adjust them if required?

Chris
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Chart: Include Constant Lines values in Y-Axis Auto Rang

Post by Alex K. »

Hello,

Unfortunately, it is no way to get auto-range values.
You can use your method.

Thank you.
Chris42
Posts: 27
Joined: Fri Aug 18, 2017 5:50 pm

Re: Chart: Include Constant Lines values in Y-Axis Auto Rang

Post by Chris42 »

Hi Alex,

Great, thanks, I'll use my method.

Chris
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Chart: Include Constant Lines values in Y-Axis Auto Rang

Post by Alex K. »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply