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.
Unfortunately, activation email could not send to your email. Please try again.

ChartAdvModel and support for HidePartialLabels

Thread ID:

Created:

Updated:

Platform:

Replies:

107531 Mar 6,2013 05:16 AM Jan 23,2014 12:09 AM ASP.NET MVC (Classic) 3
loading
Tags: Chart
Robert Svallin
Asked On March 6, 2013 05:16 AM

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.

Vijayabharathi K [Syncfusion]
Replied On March 11, 2013 06:24 AM

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


Kabanets
Replied On January 21, 2014 03:30 PM

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

Anandaraj T [Syncfusion]
Replied On January 23, 2014 12:09 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;