draw own lines in chart
draw own lines in chart
Hello!
Is it possible to draw a short vertical line (not gridline) in a line-chart at a specific Y-value? I found a component StiVerticalLinePrimitive but how do I set it's Left and Top attributes dynamically, depending on the Y-value which I get from a datasource and the charts data. See below:
Is it possible to draw a short vertical line (not gridline) in a line-chart at a specific Y-value? I found a component StiVerticalLinePrimitive but how do I set it's Left and Top attributes dynamically, depending on the Y-value which I get from a datasource and the charts data. See below:
Re: draw own lines in chart
Hello.
But you could use Constant Lines property of the chart. And set it's value from code or, for example, in before print event of the chart.
Thank you.
Unfortunately, there is no such feature and StiVerticalLinePrimitive will not help you.gunde99 wrote:Is it possible to draw a short vertical line (not gridline) in a line-chart at a specific Y-value? I found a component StiVerticalLinePrimitive but how do I set it's Left and Top attributes dynamically, depending on the Y-value which I get from a datasource and the charts data.
But you could use Constant Lines property of the chart. And set it's value from code or, for example, in before print event of the chart.
Code: Select all
this.Item3.AxisValue = "5";
- Attachments
-
- Report.mrt
- (11.75 KiB) Downloaded 390 times
Re: draw own lines in chart
Thank you for your reply. That looks great but I have two more questions.
1. Is the constans line always called "Item3"? If not, how can I find the name in my charts?
2. This is all well if I know the X-axis-value but in my case I know the Y-axis-value. Could you please post a script example on how to extract the corresponding X-value from the chart's datasource?
1. Is the constans line always called "Item3"? If not, how can I find the name in my charts?
2. This is all well if I know the X-axis-value but in my case I know the Y-axis-value. Could you please post a script example on how to extract the corresponding X-value from the chart's datasource?
Re: draw own lines in chart
Hello.
Thank you.
If you add constant line in Designer and it's name is Item3 then this name will be the same and you could use it.gunde99 wrote:1. Is the constans line always called "Item3"? If not, how can I find the name in my charts?
It's impossible to get value from the chart. You could get it from Data Source if you know y-axis-value.gunde99 wrote:2. This is all well if I know the X-axis-value but in my case I know the Y-axis-value. Could you please post a script example on how to extract the corresponding X-value from the chart's datasource?
Thank you.
Re: draw own lines in chart
That's my problem. I can't find any name-property and I don't see the name anywhere else in the designer.If you add constant line in Designer and it's name is Item3 then this name will be the same and you could use it.
Re: draw own lines in chart
Hello.
But you could find it in the code tab. Thank you.
But you could find it in the code tab. Thank you.
Re: draw own lines in chart
My code looks empty:
Am I missing something?
Am I missing something?
Re: draw own lines in chart
Hello.
You should enable showing of the Auto Generated code. Thank you.
You should enable showing of the Auto Generated code. Thank you.
Re: draw own lines in chart
Ah, there it is! Thank you!
Re: draw own lines in chart
Hello.
We are always glad to help you.
Let us know if you'll need any additional help.
Thank you.
We are always glad to help you.
Let us know if you'll need any additional help.
Thank you.