We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

ChartAdvModel and support for HidePartialLabels

Hi. I am using ChartAdvModel and I am currently looking for the equivalent of PrimaryYAxis.HidePartialLabels that exists in MVCChartModel. The version I am using is 10.304.0.43.

By that I mean that I want to build a chart where the intial and ending value in the axis range aren´t displayed in the chart. Is there such support in ChartAdvModel or another way to accomplish this? Or is the support only currently available in MVCChartModel? If so, is the functionality planned for development in coming versions of Chart ASP.NET MVC?

Thank you in advance for your reply.

3 Replies

VK Vijayabharathi K Syncfusion Team March 11, 2013 10:24 AM UTC

Hi Robert,

 

Thanks for using Syncfusion products.

 

The feature “HidePartialLabels –Show/Hide edge labels support in axis”  isn’t not available in our HTML5 canvas(ChartAdv) chart control. Also, It is available only in MVC chart control(MVCChartModel). So, we will consider this functionality for HTML5 chart and it will be available in our forthcoming new version releases or service pack releases. Please let us know if any concerns.

 

Regards,

Vijayabharathi



KA Kabanets January 21, 2014 08:30 PM UTC

Hi

Is there a workaround to this problem?
I need to display the days of the month in сolumn ChartAdv. The first and last columns are clipped. 0 and 32 day looks is funny.

Regards
Andrey


AT Anandaraj T Syncfusion Team January 23, 2014 05:09 AM UTC

Hi Andrey,

Currently, "HidePartialLabels" property is not available in our Html5 Chart. As a work around solution, we can use the client side event "OnAxesLabelsInitialize" for customizing axis labels before rendering chart axis labels. For hiding first and last labels, we can set empty string values for the first and last labels of primary X axis labels collection.

Code Snippet:
<code>
[CS]
           //Client side event for customizing axis labels
            model.ClientSideEvents.OnAxesLabelsInitialize = "LabelsInitialize";

[JS]
    //Client side event for customizing axis labels
        function LabelsInitialize(sender, args) {
            var count = args.Data.Axes.PrimaryX.LablesCollection.length;

            //Empty string values for first and last axis labels      
            args.Data.Axes.PrimaryX.LablesCollection[0].Text = " ";
            args.Data.Axes.PrimaryX.LablesCollection[count-1].Text = " ";      
      }

We have also created a simple sample for your requirement and attached it below.

Please let us know if you have any concern.

Regards,
Anand


Html5HidePartialLabelsMVC_70ffc038.zip

Loader.
Live Chat Icon For mobile
Up arrow icon