I would like to have a vertical ConstantLine, with a property like Band.Binding to determine if it should be a horizontal or vertical line.
(I know I could misuse a Cursor to get a vertical constant line, but I like to keep it simple!)
Thanks,
Joost
Vertical constant lines
Moderator: Queue Moderators
Re: Vertical constant lines
Hi,
I'm interested in the same thing. Did you find a solution to your problem?
I would like to use a simple ConstantLine with some text and no need for all the cursors features in my application.
Thank you.
I'm interested in the same thing. Did you find a solution to your problem?
I would like to use a simple ConstantLine with some text and no need for all the cursors features in my application.
Thank you.
Re: Vertical constant lines
No, still using a LineSeriesCursor as a workaround.
-
- Posts: 3
- Joined: Fri Aug 03, 2018 1:18 pm
Re: Vertical constant lines
Hi,
You can create a LineCollection with 1 SegmentLine in it.
Vertical line at x= 1 from y= 1 to y = 5
LineCollection lineCollection = new LineCollection();
SegmentLine[] segmentLines = new SegmentLine[1];
SegmentLine segmentLine = new SegmentLine();
segmentLine.AX = 1;
segmentLine.BX = 1;
segmentLine.AY = 1;
segmentLine.BY = 5;
segmentLines[0] = segmentLine;
lineCollection.Lines = segmentLines;
chart.ViewXY.LineCollections.Add(lineCollection);
To add more lines, just add more SegmentLine's in the LineCollection.
Let me know if the requirement was different.
Thanks,
Nitin Shrivastava
You can create a LineCollection with 1 SegmentLine in it.
Vertical line at x= 1 from y= 1 to y = 5
LineCollection lineCollection = new LineCollection();
SegmentLine[] segmentLines = new SegmentLine[1];
SegmentLine segmentLine = new SegmentLine();
segmentLine.AX = 1;
segmentLine.BX = 1;
segmentLine.AY = 1;
segmentLine.BY = 5;
segmentLines[0] = segmentLine;
lineCollection.Lines = segmentLines;
chart.ViewXY.LineCollections.Add(lineCollection);
To add more lines, just add more SegmentLine's in the LineCollection.
Let me know if the requirement was different.
Thanks,
Nitin Shrivastava