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

Decimal point in yaxis

4 Answers 109 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Imran
Top achievements
Rank 1
Imran asked on 04 Apr 2008, 08:56 PM
Hi, I'm using RadControls for Telerik in dot net. On Yaxis it only shows upto one decimal place. What would be the name space to modify it upto say 3 decimal places (pad zeroes)?

Chart.PlotArea? Or Data Table?

Thanks!

4 Answers, 1 is accepted

Sort by
0
Accepted
Giuseppe
Telerik team
answered on 07 Apr 2008, 10:16 AM
Hello Imran,

You need to customize the CustomFormat property like this:

<PlotArea> 
    <YAxis Appearance-CustomFormat="0.000"></YAxis> 
    ... 
</PlotArea> 


Hope this helps.


Kind regards,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Imran
Top achievements
Rank 1
answered on 07 Apr 2008, 03:12 PM
Thanks a lot!

I'm doing it via code, here it is:

chart.PlotArea.YAxis.Appearance.CustomFormat = "0.00";
0
Imran
Top achievements
Rank 1
answered on 07 Apr 2008, 03:41 PM
It's works except it's clipping the number on yAxis, I increased chart.Width but a of width has to be increased to make these numbers not clip. I guess Chart "center" point is not left.
0
Giuseppe
Telerik team
answered on 08 Apr 2008, 10:26 AM
Hello Imran,

You need to adjust manually the left margin value of the plot area so the elements do not overlap with one another like this:

<rad:RadChart ID="RadChart1" runat="Server"
    <Series> 
        <rad:ChartSeries Name="Series 1" Type="Bar" YAxisType="Primary"
            <Appearance> 
                <EmptyValue Mode="Approximation"
                </EmptyValue> 
            </Appearance> 
            <Items> 
                <rad:ChartSeriesItem Name="Item 1" YValue="0.1"
                </rad:ChartSeriesItem> 
                <rad:ChartSeriesItem Name="Item 2" YValue="0.8"
                </rad:ChartSeriesItem> 
                <rad:ChartSeriesItem Name="Item 3" YValue="0.4"
                </rad:ChartSeriesItem> 
            </Items> 
        </rad:ChartSeries> 
    </Series> 
    <PlotArea> 
        <Appearance Dimensions-Margins="18%, 24%, 12%, 50px"
        </Appearance> 
        <YAxis Appearance-CustomFormat="0.000"
        </YAxis> 
    </PlotArea> 
</rad:RadChart> 


We are working on AutoLayout functionality that will be introduced in the Q1 2008 release (scheduled in about a week) that will achieve the desired effect automatically through a single property(AutoLayout=true).


Greetings,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Imran
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Imran
Top achievements
Rank 1
Share this question
or