Hi All,
I'm currently trying to plot a list of vectors on a 2D chart. What I mean by 'vectors', is just a simple lines which start on an specific X-Y coordinate and ends on another one.
For this purposes I was trying to use the composite chart, specifically as a scatterChart, where each vector would be a single XYSeries object containing 2 XYDatapoints (start and end)
However, this proves somewhat troublesome, as each vector can vary in the following ways:
- Different lengths (can easily be accomplished by changing the 'ending' XYData point
- Different line styles (dashed, solid)
- Different colors
- Different symbols (each vector has just 1 symbol at the start point, but not the end point)
- Some vectors have a label next to it
I found that the LineAppearance class addresses most of these variants altogether; but I can't seem to find a way to apply a LineAppearance to a single XYseries in an scatterchart, so the workaround I found is to create several ScatterChartAppearance 's with all the format combinations I'll be using, and assigning a series to the scatterchartappearance; but that seems way too excessive.
So, my question would be, is there a way to customize the items I described above in a per-XYSeries basis? Or is there a better type of chart / way to approach this issue?
Also, what's the difference between scatterChart and scatterLineChart, given that the former has a ConnectWithLines property?
Thanks,
- Nicolas.
Hello,
I am just checking about the progress of this issue. Let me know If you need our further assistance on this matter ?
Thank you for using Infragistics Components.
Thanks!, it was just what I was looking for.
However, I wanted to ask you another question: to clean up the chart, is there a way to offset the labels that gets printed right on top of the start / end node, so as to make it more readable?
Thanks again,
Thanks again; this will do for now.
What you could do is to set Horizontal and Vertical alignment of ChartTextApperance. So you could use following code in my sample
ultraChart1.ScatterChart.ChartText.Add(new ChartTextAppearance() { ChartTextFont = new System.Drawing.Font("Arial", 7F),
ClipText = false,
Column = -2,
Row = -2,
ItemFormatString = "<ITEM_LABEL>",
HorizontalAlign = StringAlignment.Far,// set horizontal alignment
VerticalAlign = StringAlignment.Far,//set vertical alignment
FontColor = Color.Black,
Visible = true });
I hope that this will helps you.