Hi, I have an HtmlChart tied to a SQLDataSource. It's pretty simple, but I would like each of the bars colored differently. The first bar RED, middle, YELLOW, then GREEN. I'm even bringing the color from the query.
Can someone assist me with this.
Can someone assist me with this.
<telerik:RadHtmlChart runat="server" ID="RadHtmlChart2" DataSourceID="SqlDataSourceActionColor" OnDataBound="RadHtmlChart2_DataBound"> <PlotArea> <Series> <telerik:ColumnSeries DataFieldY="Value" Name="IncidentByMonth"> </telerik:ColumnSeries> </Series> <XAxis DataLabelsField="COLOR"> <LabelsAppearance RotationAngle="300"> </LabelsAppearance> </XAxis> <YAxis> <TitleAppearance Text=""> </TitleAppearance> </YAxis> </PlotArea> <Legend> <Appearance Visible="false"> </Appearance> </Legend> <ChartTitle Text="Near Miss by Risk Category"> </ChartTitle></telerik:RadHtmlChart><asp:SqlDataSource ID="SqlDataSourceActionColor" runat="server" ConnectionString="<%$ ConnectionStrings:OSHAConnectionString %>" SelectCommand=" select a.COLOR, a.Action, b.Value from ( select 'RED' as COLOR, 'ACTION NECESSARY' as Action UNION ALL select 'YELLOW' as COLOR, 'ACTION APPROPRIATE IF PRATICAL AND ECONOMIC' AS ACTION UNION ALL select 'GREEN' as COLOR, 'NO ACTION REQUIRED' AS ACTION ) a LEFT OUTER JOIN ( select count(ID) as Value, ActionColor, Action from [aaa_v_ReportingData] where YEAR = @Year and Location = @Location group by ActionColor, Action ) B ON B.ACTIONCOLOR = A.COLOR"> <SelectParameters> <asp:ControlParameter ControlID="RadComboBox2" Name="Year" PropertyName="SelectedValue" /> <asp:ControlParameter ControlID="RadComboBox1" Name="Location" PropertyName="SelectedValue" /> </SelectParameters></asp:SqlDataSource>