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

Different MinValue than AxisCrossingValue

1 Answer 132 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
License
Top achievements
Rank 1
License asked on 04 Apr 2016, 02:06 PM

I am transitioning my charts from another third party product to the RadHTMLChart and the only functionality that I can't quite get to work is getting a proper buffer between the bottom of the chart and the beginning of my data. I wanted to have clean, rounded number increments on the YAxis so I rounded my min value down (e.g. 5,187  to 5,000) but now I want a larger buffer on the bottom between my first MajorTickLine and the X-Axis. Attached is an image of the old chart that I want to replicate. Notice that the XAxis does not have a value itself but the first YAxis tick line does.

Any help is appreciated.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 07 Apr 2016, 08:24 AM
Hi Robert,

You can achieve that by using the YAxis-LabelAppearance-Skip property—http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/server-side-programming/axes-configuration#attribute-properties-in-axis--labelsappearance.

Here you are a basic example:
<telerik:RadHtmlChart runat="server" ID="AreaLineSplineChart">
    <PlotArea>
        <Series>
            <telerik:LineSeries Name="Line Series">
                <MarkersAppearance Visible="false" />
                <SeriesItems>
                    <telerik:CategorySeriesItem Y="5000" />
                    <telerik:CategorySeriesItem Y="5800" />
                    <telerik:CategorySeriesItem Y="6300" />
                </SeriesItems>
            </telerik:LineSeries>
        </Series>
        <XAxis>
            <Items>
                <telerik:AxisItem LabelText="2004" />
                <telerik:AxisItem LabelText="2005" />
                <telerik:AxisItem LabelText="2006" />
            </Items>
        </XAxis>
        <YAxis MinValue="4500" Step="500" >
            <MajorGridLines Color="#EFEFEF" Width="1" />
            <MinorGridLines Color="#F7F7F7" Width="1" />
            <LabelsAppearance Skip="1">
            </LabelsAppearance>
        </YAxis>
    </PlotArea>
</telerik:RadHtmlChart>


Regards,
Ianko
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Chart (HTML5)
Asked by
License
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or