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

sowing Month names instead of number on X-axis

0 Answers 58 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Thaman
Top achievements
Rank 1
Thaman asked on 10 Dec 2017, 12:21 AM

Hi, 

 

I have following code for line chart and I would like to change the X value filed from number (1,2,3 ... ,12) to name of the months (Jan, Feb... Dec). Down below is my code. 

 

 

<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Width="1500px" Height="500px" DataSourceID="dsResults" InvokeLoadData="OnPageLoad" >

                                        <Legend>
                                            <Appearance Position="Right" BackgroundColor="#cccccc" Visible="true">
                                                <TextStyle FontSize="14" Bold="true" />
                                            </Appearance>
                                        </Legend>
                                        <PlotArea>
                                            <Series>
                                                <telerik:LineSeries Name="CY Percent Obligated" DataFieldY="CY_PCT_OBS">
                                                    <Appearance>
                                                        <FillStyle BackgroundColor="#003300" />
                                                    </Appearance>
                                                    <MarkersAppearance MarkersType="Square" BackgroundColor="#003300" BorderColor="ForestGreen" />
                                                    <LabelsAppearance Visible="false">
                                                    </LabelsAppearance>
                                                    <TooltipsAppearance BackgroundColor="White">
                                                        <ClientTemplate>
                                                            #=dataItem.CY_PCT_OBS#
                                                        </ClientTemplate>
                                                    </TooltipsAppearance>
                                                </telerik:LineSeries>
                                                <telerik:LineSeries Name="Percent Obligated 2017" DataFieldY="PY1_PCT_OBS">
                                                    <Appearance>
                                                        <FillStyle BackgroundColor="#009933" />
                                                    </Appearance>
                                                    <MarkersAppearance MarkersType="Square" BackgroundColor="#009933" BorderColor="ForestGreen" />
                                                    <LabelsAppearance Visible="false">
                                                    </LabelsAppearance>
                                                    <TooltipsAppearance BackgroundColor="White">
                                                        <ClientTemplate>
                                                            #=dataItem.PY1_PCT_OBS#
                                                        </ClientTemplate>
                                                    </TooltipsAppearance>
                                                </telerik:LineSeries>
                                                ...

                                            </Series>
                                           <XAxis BaseUnit="Months" MinValue="1" MaxValue="12" DataLabelsField="FM" MajorTickType="Outside" Color="Black" Width="2px">
                                                <LabelsAppearance DataFormatString="MM" RotationAngle="0" Skip="0" Step="1">
                                                    <TextStyle Bold="true" FontSize="16" Color="Black" />
                                                </LabelsAppearance>
                                                <TitleAppearance Position="Center" RotationAngle="0" Text="Fiscal month"></TitleAppearance>
                                            </XAxis>
                                            <YAxis Color="Black" Width="2px">
                                                <LabelsAppearance DataFormatString="{0}%" RotationAngle="0" Skip="0" Step="1">
                                                    <TextStyle Bold="true" Color="Black" />
                                                </LabelsAppearance>
                                                <TitleAppearance Position="Center" RotationAngle="0" Text="Percentage"></TitleAppearance>
                                            </YAxis>
                                        </PlotArea>
                                        
                                    </telerik:RadHtmlChart >

No answers yet. Maybe you can help?

Tags
Chart
Asked by
Thaman
Top achievements
Rank 1
Share this question
or