Hi telerik,
We are plotting ScatterlineSeries on a RadCartesianChart. Works well.
However, as we plot several series in same chart, our users request a tooltip with the name of series to distinguish them.
I've tried to set the TooltipTemplate of the chart in which case I can get the tooltip for *points* and thought I could use that as a workaround and place Curve Name on each point. However, when I try to bind to an 'enriched' Datapoint I get an error as the points in the serie are ScatterDataPoints (though I've tried to add my 'customized' points, see below).
So I guess I'm missing the point here - or quite a few ;)
First of all, what is the recommended way of providing a serie-specific text on each curve as a tooltip?
And if my approach is not to far off, can you see what I do wrong?
Thanks,
Anders, Denmark
We are plotting ScatterlineSeries on a RadCartesianChart. Works well.
However, as we plot several series in same chart, our users request a tooltip with the name of series to distinguish them.
I've tried to set the TooltipTemplate of the chart in which case I can get the tooltip for *points* and thought I could use that as a workaround and place Curve Name on each point. However, when I try to bind to an 'enriched' Datapoint I get an error as the points in the serie are ScatterDataPoints (though I've tried to add my 'customized' points, see below).
So I guess I'm missing the point here - or quite a few ;)
First of all, what is the recommended way of providing a serie-specific text on each curve as a tooltip?
And if my approach is not to far off, can you see what I do wrong?
Thanks,
Anders, Denmark
itemsSource.Add(
new
Rap1DDataPoint(valuesX[i], valuesY[i],curve.CurveName));
public
class
Rap1DDataPoint : DataPoint
{
public
string
CurveName {
get
;
set
; }
public
Rap1DDataPoint(
double
x,
double
y,
string
curveName):
base
(x,y)
{
CurveName = curveName;
}
}
var lineSeries =
new
ScatterLineSeries
{
ShowLabels =
true
,
ToolTip = legendHeader,
Stroke = serieColor,
StrokeThickness = 2,
//LegendLabel = legendHeader,
//SeriesDefinition = splineSeriesDefinition,
ItemsSource = itemsSource,
XValueBinding =
new
PropertyNameDataPointBinding(
"XValue"
),
YValueBinding =
new
PropertyNameDataPointBinding(
"YValue"
),
PointTemplate = pointTemplate
};