Hi,
I have a datatable that I am binding to a RadChart. The DataTable looks like this:
Applicant Type Vacancy Title User Count
Applicants 1, CFO 7
Applicants 2, CEO 3
Shortlisted 1, CFO 1
Shortlisted 2, CEO 1
I am binding this to the RadChart and then setting the following properties programmatically:
chrtStackedBar.DataGroupColumn = "Applicant Type";
chrtStackedBar.PlotArea.XAxis.DataLabelsColumn = "Vacancy Title";
chrtStackedBar.Legend.Appearance.GroupNameFormat = "#VALUE";
As far as I understand it this should then put the relevant Vacancy Title along the X-Axis; Applicants and Shortlisted in the legend; and create two series based on the grouping. Instead all I get is one series with X-Axis values being 1,2,3,4,5,6,7. It inserts my data into columns 1-4 as a single series. My legend has User Count as the series.
The HTML generated for the RadChart looks like this:
All I've changed is the DefaultType, removed the AutoScale from the X-Axis, and I've changed the Y-Axis values. The rest is all generated.
Can you please tell me what I'm doing wrong?
I have a datatable that I am binding to a RadChart. The DataTable looks like this:
Applicant Type Vacancy Title User Count
Applicants 1, CFO 7
Applicants 2, CEO 3
Shortlisted 1, CFO 1
Shortlisted 2, CEO 1
I am binding this to the RadChart and then setting the following properties programmatically:
chrtStackedBar.DataGroupColumn = "Applicant Type";
chrtStackedBar.PlotArea.XAxis.DataLabelsColumn = "Vacancy Title";
chrtStackedBar.Legend.Appearance.GroupNameFormat = "#VALUE";
As far as I understand it this should then put the relevant Vacancy Title along the X-Axis; Applicants and Shortlisted in the legend; and create two series based on the grouping. Instead all I get is one series with X-Axis values being 1,2,3,4,5,6,7. It inserts my data into columns 1-4 as a single series. My legend has User Count as the series.
The HTML generated for the RadChart looks like this:
| <telerik:RadChart ID="chrtStackedBar" runat="server" Skin="Web20" Height="350px" |
| Width="644px" Visible="False" DefaultType="Bar"> |
| <PlotArea> |
| <EmptySeriesMessage Visible="True"> |
| <Appearance Visible="True"> |
| </Appearance> |
| </EmptySeriesMessage> |
| <XAxis AutoScale="False" MaxValue="7" MinValue="1" Step="1"> |
| <Appearance Color="149, 184, 206" MajorTick-Color="149, 184, 206"> |
| <MajorGridLines Width="0" Color="209, 221, 238"></MajorGridLines> |
| </Appearance> |
| </XAxis> |
| <YAxis AutoScale="False" MaxValue="30" MinValue="0" Step="10"> |
| <Appearance Color="149, 184, 206" MinorTick-Color="149, 184, 206" MajorTick-Color="149, 184, 206"> |
| <MajorGridLines Color="209, 221, 238"></MajorGridLines> |
| <MinorGridLines Color="209, 221, 238"></MinorGridLines> |
| </Appearance> |
| <Items> |
| <cc1:ChartAxisItem> |
| </cc1:ChartAxisItem> |
| <cc1:ChartAxisItem Value="5"> |
| </cc1:ChartAxisItem> |
| <cc1:ChartAxisItem Value="10"> |
| </cc1:ChartAxisItem> |
| <cc1:ChartAxisItem Value="15"> |
| </cc1:ChartAxisItem> |
| <cc1:ChartAxisItem Value="20"> |
| </cc1:ChartAxisItem> |
| <cc1:ChartAxisItem Value="25"> |
| </cc1:ChartAxisItem> |
| <cc1:ChartAxisItem Value="30"> |
| </cc1:ChartAxisItem> |
| </Items> |
| </YAxis> |
| <Appearance> |
| <FillStyle MainColor="249, 250, 251" FillType="Solid"> |
| </FillStyle> |
| <Border Color="149, 184, 206"></Border> |
| </Appearance> |
| </PlotArea> |
| <Appearance> |
| <Border Color="103, 136, 190"></Border> |
| </Appearance> |
| <ChartTitle> |
| <Appearance> |
| <FillStyle MainColor=""> |
| </FillStyle> |
| </Appearance> |
| <TextBlock> |
| <Appearance TextProperties-Color="0, 0, 79"> |
| </Appearance> |
| </TextBlock> |
| </ChartTitle> |
| <Legend> |
| <Appearance Position-AlignedPosition="TopRight" Dimensions-Margins="17.6%, 3%, 1px, 1px" |
| Dimensions-Paddings="2px, 8px, 6px, 3px"> |
| <Border Color="165, 190, 223"></Border> |
| </Appearance> |
| </Legend> |
| </telerik:RadChart> |
All I've changed is the DefaultType, removed the AutoScale from the X-Axis, and I've changed the Y-Axis values. The rest is all generated.
Can you please tell me what I'm doing wrong?