We have a line chart that uses a stored procedure for data. There is a combo box that allows the user to select a different category, and to view the chart for that category. When the chart first loads, it has the expected line colors for the selected theme. When the combo box value is changed the chart reloads properly, but the line colors change. Here's the definition for the chart.
The only other code affecting the chart is to update the chart title when the selected value changes.
I've attached a before and after image of how the chart appears. This seems to occur with any Skin. Subsequent reloads keep the same colors as the first reload.
Any ideas?
<telerik:RadChart ID="RadChartCategory" runat="server" DataSourceID="dsChartData" Width="950" Height="650" Skin="Vista"> <PlotArea> <YAxis> <Appearance CustomFormat="#,#"> </Appearance> </YAxis> <XAxis DataLabelsColumn="StringDate" LabelStep="4"> </XAxis> </PlotArea> <Series> <telerik:ChartSeries DataYColumn="Scenario1" DefaultLabelValue="" Name="Scenario 1" Type="Line"> </telerik:ChartSeries> <telerik:ChartSeries DataYColumn="Scenario2" DefaultLabelValue="" Name="Scenario 2" Type="Line"> </telerik:ChartSeries> <telerik:ChartSeries DataYColumn="Scenario3" DefaultLabelValue="" Name="Scenario 3" Type="Line"> </telerik:ChartSeries> <telerik:ChartSeries DataYColumn="Theoretical" DefaultLabelValue="" Name="Theoretical Capacity" Type="Line"> </telerik:ChartSeries> <telerik:ChartSeries DataYColumn="NetEffective" DefaultLabelValue="" Name="Net Effective Capacity" Type="Line"> </telerik:ChartSeries> </Series> <ChartTitle> <TextBlock Text="Labour Demand"> </TextBlock> </ChartTitle></telerik:RadChart>The only other code affecting the chart is to update the chart title when the selected value changes.
Protected Sub RadComboBoxCategory_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles RadComboBoxCategory.SelectedIndexChanged RadChartCategory.ChartTitle.TextBlock.Text = "Labour Demand - " & RadComboBoxCategory.SelectedItem.TextEnd SubI've attached a before and after image of how the chart appears. This seems to occur with any Skin. Subsequent reloads keep the same colors as the first reload.
Any ideas?