This is a migrated thread and some comments may be shown as answers.

chart skin gray

1 Answer 44 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Thomas Gross
Top achievements
Rank 1
Thomas Gross asked on 11 Sep 2010, 05:50 PM
i have created a chart with 6 series with gray skin with the wizard
the renderd colors are form buttom to top:
* blue
* green
* light gray
* gray
* dark gray
* orange
When i look to the series i can't find blue and green. There are no gradients for this colors too.
I want to change the order of the colors via code. See code at the end. Wenn i make this changes in order i get the following colors:
* gray
* orange
*gray
*gray
*gray    (this should be blue)
*gray    (this should be green)
When i look tho the code, i do not wonder, because the defination is realy gray. But when i don't change the orde green and blue is renderd.
Can you give me the defination of this green and blue (gradient) color please.

thanks
thomas

 

<telerik:RadChart ID="rctElectricityMix" runat="server"

 

 

DataSourceID="SqlDataSourceChart" DefaultType="StackedBar"

 

 

Skin="Gray" Width="245px" Height="390px">

 

 

<Series>

 

 

<telerik:ChartSeries Name="SolidFuels" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle MainColor="164, 164, 164">

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

<telerik:ChartSeries Name="Oil" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle MainColor="108, 108, 108">

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

<telerik:ChartSeries Name="Gas" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle FillType="ComplexGradient" MainColor="79, 79, 79">

 

 

<FillSettings>

 

 

<ComplexGradient>

 

 

<telerik:GradientElement Color="234, 234, 234" />

 

 

<telerik:GradientElement Color="222, 222, 222" Position="0.5" />

 

 

<telerik:GradientElement Color="197, 197, 197" Position="1" />

 

 

</ComplexGradient>

 

 

</FillSettings>

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

<Border Color="200, 200, 200" />

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

<telerik:ChartSeries Name="Nuclear" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle FillType="ComplexGradient">

 

 

<FillSettings>

 

 

<ComplexGradient>

 

 

<telerik:GradientElement Color="191, 191, 191" />

 

 

<telerik:GradientElement Color="165, 165, 165" Position="0.5" />

 

 

<telerik:GradientElement Color="Gray" Position="1" />

 

 

</ComplexGradient>

 

 

</FillSettings>

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

<Border Color="200, 200, 200" />

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

<telerik:ChartSeries Name="Renewables" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle FillType="ComplexGradient">

 

 

<FillSettings>

 

 

<ComplexGradient>

 

 

<telerik:GradientElement Color="150, 150, 150" />

 

 

<telerik:GradientElement Color="117, 117, 117" Position="0.5" />

 

 

<telerik:GradientElement Color="92, 92, 92" Position="1" />

 

 

</ComplexGradient>

 

 

</FillSettings>

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

<Border Color="200, 200, 200" />

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

<telerik:ChartSeries Name="Other" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle FillType="ComplexGradient">

 

 

<FillSettings>

 

 

<ComplexGradient>

 

 

<telerik:GradientElement Color="245, 100, 50" />

 

 

<telerik:GradientElement Color="248, 133, 92" Position="0.5" />

 

 

<telerik:GradientElement Color="252, 151, 116" Position="1" />

 

 

</ComplexGradient>

 

 

</FillSettings>

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

<Border Color="200, 200, 200" />

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

</Series>

 

 

for (int i = 0; i < 6; i++)

 

{

 

if (chart.Series[i] != null)

 

{

 

//chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add();

 

 

 

 

 

switch (i)

 

{

 

case 2: // solid fuels

 

 

 

 

chart.Series[i].Appearance.FillStyle.MainColor = System.Drawing.

Color.FromArgb(164, 164, 164);

 

 

break;

 

 

case 3: // oil

 

 

 

 

chart.Series[i].Appearance.FillStyle.MainColor = System.Drawing.

Color.FromArgb(108, 108, 108);

 

 

break;

 

 

case 4: // gas

 

 

 

 

chart.Series[i].Appearance.FillStyle.FillType = Telerik.Charting.Styles.

FillType.ComplexGradient;

 

chart.Series[i].Appearance.FillStyle.MainColor = System.Drawing.

Color.FromArgb(79, 79, 79);

 

gradient =

new GradientElement(System.Drawing.Color.FromArgb(234, 234, 234), 0.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(222, 222, 222), 0.5f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(197, 197, 197), 1.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

 

break;

 

 

case 5: // nuclear

 

 

 

 

chart.Series[i].Appearance.FillStyle.FillType = Telerik.Charting.Styles.

FillType.ComplexGradient;

 

gradient =

new GradientElement(System.Drawing.Color.FromArgb(191, 191, 191), 0.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(165, 165, 165), 0.5f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromName("Gray"), 1.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

 

 

break;

 

 

case 0: // renewables

 

 

 

 

chart.Series[i].Appearance.FillStyle.FillType = Telerik.Charting.Styles.

FillType.ComplexGradient;

 

gradient =

new GradientElement(System.Drawing.Color.FromArgb(150, 150, 150), 0.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(117, 117, 117), 0.5f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(92, 92, 92), 1.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

 

 

break;

 

 

case 1: // other

 

 

 

 

chart.Series[i].Appearance.FillStyle.FillType = Telerik.Charting.Styles.

FillType.ComplexGradient;

 

gradient =

new GradientElement(System.Drawing.Color.FromArgb(237, 130, 3), 0.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(239, 149, 43), 0.5f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(241, 172, 91), 1.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

chart.Series[i].Appearance.Border.Color = System.Drawing.

Color.FromArgb(192, 123, 41);

 

 

break;

 

}

}

}

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 16 Sep 2010, 01:46 PM
Hi Thomas Gross,

Can you please send us a working example application that demonstrates this behavior so we can advise you properly how to proceed?


Looking forward to your reply.


Greetings,
Yavor Ivanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart (Obsolete)
Asked by
Thomas Gross
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or