I am using the Q3-2009 release and have successfully added static vertical lines as another series to a horizontal bar graph. The bar graph is a percentile representation of data with the vertical lines being the low end of a series of targets. I have scaled the graph to start at the low and high ends of the targets, with a little room above and below so that the lowest value in the data series is shown and the target series is shown clearly with outliers in the data series shown extending past the edge of the graph.
All of that works perfectly and I can upload a sample project that demonstrates the basics of how that is accomplished. What isn't working is the positioning of the SeriesItem labels. Your RadChart help references the [SeriesItem].Label.Appearance property, which is a broken link, and I drilled into the lightly documented (i.e. What's the Single value represent, pixels, percent of chart area?) API help for info on .Position.X and .Position.Y.
Here is the code I'm trying to implement.
All of that works perfectly and I can upload a sample project that demonstrates the basics of how that is accomplished. What isn't working is the positioning of the SeriesItem labels. Your RadChart help references the [SeriesItem].Label.Appearance property, which is a broken link, and I drilled into the lightly documented (i.e. What's the Single value represent, pixels, percent of chart area?) API help for info on .Position.X and .Position.Y.
Here is the code I'm trying to implement.
var targetLine = new ChartSeries
{
Type = ChartSeriesType.Line
};
// To get a vertical line, the series has to be added for each person
int countTeam = SampleData.Rows.Count;
// Setup first item with label
targetLine.AddItem(value);
// Show labels only on this first series item
ChartSeriesItem item = targetLine.Items[0];
item.Label.Visible = true;
item.Label.Appearance.RotationAngle = 90;
item.Label.TextBlock.Text = "#Y{P1}";
// Show the rest of the series items without labels
for (int i = 1; i < countTeam; i++)
{
targetLine.AddItem(value);
targetLine.Items[i].Label.Visible = false;
}
RadChart1.AddChartSeries(targetLine);
... (removed series color coding)
// Try to reposition the labels with the end goal to be to draw them
// below the scale with a label connector line
// BUG: this fails to relocate
item.Label.Appearance.Position.Auto = false;
item.Label.Appearance.Position.X += 10; // Using random numbers at this point since nothing is happening, there's
item.Label.Appearance.Position.Y += 10; // no documentation, and I don't know if X & Y are axis or screen oriented
item.Label.Appearance.LabelConnectorStyle.Visible = true;
The labels show up as they should, only one on the first item in the series, i.e. the bottom of the chart, but it refuses to move at all from the spot it is automatically drawn. Am I trying to affect this at the wrong point of its creation or is the documentation missing something and/or the interface exposing something it shouldn't, i.e. Position.X and Position.Y being public writable when they don't actually have any affect?
{
Type = ChartSeriesType.Line
};
// To get a vertical line, the series has to be added for each person
int countTeam = SampleData.Rows.Count;
// Setup first item with label
targetLine.AddItem(value);
// Show labels only on this first series item
ChartSeriesItem item = targetLine.Items[0];
item.Label.Visible = true;
item.Label.Appearance.RotationAngle = 90;
item.Label.TextBlock.Text = "#Y{P1}";
// Show the rest of the series items without labels
for (int i = 1; i < countTeam; i++)
{
targetLine.AddItem(value);
targetLine.Items[i].Label.Visible = false;
}
RadChart1.AddChartSeries(targetLine);
... (removed series color coding)
// Try to reposition the labels with the end goal to be to draw them
// below the scale with a label connector line
// BUG: this fails to relocate
item.Label.Appearance.Position.Auto = false;
item.Label.Appearance.Position.X += 10; // Using random numbers at this point since nothing is happening, there's
item.Label.Appearance.Position.Y += 10; // no documentation, and I don't know if X & Y are axis or screen oriented
item.Label.Appearance.LabelConnectorStyle.Visible = true;