Hello,
I have a radchart and personalized chartlegend. In my chartlegend I have a checkbox and I need to get the color that has given radchart sets. But when I try to know the color, in "aparrence" fields appear all to null, but really if you are painting with a certain color.
I try get color and (look attached)
Thank you!
I have a radchart and personalized chartlegend. In my chartlegend I have a checkbox and I need to get the color that has given radchart sets. But when I try to know the color, in "aparrence" fields appear all to null, but really if you are painting with a certain color.
<
telerik:RadChart
x:Name
=
"RadChart1"
Grid.Row
=
"1"
Grid.Column
=
"1"
UseDefaultLayout
=
"False"
>
<
telerik:RadChart.SamplingSettings
>
<
telerik:SamplingSettings
SamplingFunction
=
"Average"
/>
</
telerik:RadChart.SamplingSettings
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"10"
/>
<
ColumnDefinition
Width
=
"*"
/>
<
ColumnDefinition
Width
=
"10"
/>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"10"
/>
<
RowDefinition
Height
=
"*"
/>
<
RowDefinition
Height
=
"100"
/>
<
RowDefinition
Height
=
"10"
/>
</
Grid.RowDefinitions
>
<
Grid
/>
<
telerik:ChartLegend
x:Name
=
"legendChart"
Grid.Row
=
"2"
Grid.Column
=
"1"
Header
=
""
ItemContainerStyle
=
"{DynamicResource CharLegendStyle}"
ItemsPanelOrientation
=
"Horizontal"
LegendItemMarkerShape
=
"Circle"
UseAutoGeneratedItems
=
"false"
/>
<
telerik:ChartArea
x:Name
=
"lineGraphChartArea"
Grid.Row
=
"1"
Grid.Column
=
"1"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
EnableAnimations
=
"False"
LegendName
=
"legendChart"
>
<
telerik:ChartArea.AxisX
>
<
telerik:AxisX
Title
=
"Fecha"
AutoRange
=
"True"
IsDateTime
=
"True"
Step
=
"1"
/>
</
telerik:ChartArea.AxisX
>
<
telerik:ChartArea.AxisY
>
<
telerik:AxisY
Title
=
"CMN"
AutoRange
=
"True"
ExtendDirection
=
"Up"
IsZeroBased
=
"True"
/>
</
telerik:ChartArea.AxisY
>
</
telerik:ChartArea
>
</
Grid
>
</
telerik:RadChart
>
public
SeriesMapping GenerateRandomSeries(
string
nameSerie,
int
begin)
{
SeriesMapping serie1 =
new
SeriesMapping();
serie1.ItemsSource = GenerateRandomData(begin);
serie1.ChartAreaName =
"lineGraphChartArea"
;
serie1.LegendLabel = nameSerie;
ItemMapping X =
new
ItemMapping(
"Fecha"
, DataPointMember.XValue);
ItemMapping Y =
new
ItemMapping(
"CMN"
, DataPointMember.YValue);
serie1.ItemMappings.Add(X);
serie1.ItemMappings.Add(Y);
serie1.SeriesDefinition =
new
SplineSeriesDefinition()
{
};
return
serie1;
}
public
void
AddSerieDefinition()
{
RadChart1.SeriesMappings.Add(GenerateRandomSeries(
"serie1"
,5));
RadChart1.SeriesMappings.Add(GenerateRandomSeries(
"serie2"
,10));
RadChart1.SeriesMappings.Add(GenerateRandomSeries(
"serie3"
,15));
}
I try get color and (look attached)
Thank you!