Hello Martin,
I tried this code, in the <RadCartesianChart> block :
<telerik:PointSeries>
<telerik:PointSeries.PointTemplate>
<DataTemplate>
<StackPanel>
<Ellipse Height=
"5"
Width=
"15"
Fill=
"Pink"
/>
<Image Source=
"/SIGT.EVEm.Client;component/Images/Nouvelles_icones/cle_molette.png"
/>
</StackPanel>
</DataTemplate>
</telerik:PointSeries.PointTemplate>
</telerik:PointSeries>
But there isn't changement.
This is the construction Chart :
private
void
LoadChartVisites()
{
int
nbAxesG = (chartVariables.VerticalAxis !=
null
) ? 1 : 0,
nbAxesD = 0;
foreach
(var serie
in
chartVariables.Series)
{
if
(serie.VerticalAxis !=
null
)
{
if
(serie.VerticalAxis.HorizontalLocation == AxisHorizontalLocation.Left)
{
nbAxesG++;
}
else
if
(serie.VerticalAxis.HorizontalLocation == AxisHorizontalLocation.Right)
{
nbAxesD++;
}
}
}
// ajustement du graphique des labels par rapport au graphique des mesures
// 42 px de marge par axe vertical supplémentaire + marge initiale
chartVisite.Margin =
new
Thickness(42 + nbAxesG * 26, 20, 15, 20);
this
.chartVisite.Series.Clear();
PointSeries serieVisitesPlanifiees =
new
PointSeries();
PointSeries serieVisitesPerteMesureOuImpossible =
new
PointSeries();
PointSeries serieVisitesRAS =
new
PointSeries();
serieVisitesPlanifiees.CategoryBinding =
new
PropertyNameDataPointBinding(
"DateVisite"
);
serieVisitesPlanifiees.ValueBinding =
new
PropertyNameDataPointBinding(
"GraphValue"
);
serieVisitesPlanifiees.ItemsSource = viewModel.GetVisitePlanifieeEnumerator();
serieVisitesPerteMesureOuImpossible.CategoryBinding =
new
PropertyNameDataPointBinding(
"DateVisite"
);
serieVisitesPerteMesureOuImpossible.ValueBinding =
new
PropertyNameDataPointBinding(
"GraphValue"
);
serieVisitesPerteMesureOuImpossible.ItemsSource = viewModel.GetVisitePerteMesureOuImpossibleEnumerator();
serieVisitesRAS.CategoryBinding =
new
PropertyNameDataPointBinding(
"DateVisite"
);
serieVisitesRAS.ValueBinding =
new
PropertyNameDataPointBinding(
"GraphValue"
);
serieVisitesRAS.ItemsSource = viewModel.GetVisiteRASEnumerator();
serieVisitesPlanifiees.DefaultVisualStyleSelector =
new
PointSerieVisiteStylePlanifiee();
serieVisitesPerteMesureOuImpossible.DefaultVisualStyleSelector =
new
PointSerieVisiteStylePerteMesureOuImpossible();
serieVisitesRAS.DefaultVisualStyleSelector =
new
PointSerieVisitesRAS();
serieVisitesPerteMesureOuImpossible.PointSize =
new
Size(20, 20);
serieVisitesPlanifiees.PointSize =
new
Size(20, 20);
serieVisitesRAS.PointSize =
new
Size(20, 20);
foreach
(HydroVisite visite
in
viewModel.GetVisitePerteMesureOuImpossibleEnumerator())
{
if
(visite.IsPbMesure ==
true
)
{
CartesianCustomLineAnnotation annotation =
new
CartesianCustomLineAnnotation();
annotation.VerticalAxis = chartVisite.VerticalAxis;
annotation.HorizontalAxis = chartVisite.HorizontalAxis;
annotation.VerticalFrom = 1;
annotation.VerticalTo = 1;
annotation.HorizontalFrom = ((HydroVisite)visite).DateDebutPbMesure;
annotation.HorizontalTo = ((HydroVisite)visite).DateFinPbMesure;
annotation.Stroke =
new
SolidColorBrush((Color)ColorConverter.ConvertFromString(
"Red"
));
annotation.StrokeThickness = 2;
chartVisite.Annotations.Add(annotation);
}
}
chartVisite.Series.Add(serieVisitesPlanifiees);
chartVisite.Series.Add(serieVisitesPerteMesureOuImpossible);
chartVisite.Series.Add(serieVisitesRAS);
}
(I hope the block is understable).
So, the XAML declaration and the Code Behind declaration are conflicts, or there is an other problem ?
For illustrate the general diplay, you can look the attach file.
Thank you.