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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is there a simple way to avoid Y to be double instead of int when no data/small amount of data

Thread ID:

Created:

Updated:

Platform:

Replies:

148907 Nov 7,2019 03:54 PM UTC Nov 8,2019 12:25 PM UTC Blazor 1
loading
Tags: Charts
Dan Cheremisinov
Asked On November 7, 2019 03:54 PM UTC

<EjsChart></EjsChart>
I have to show a number of downloads for some time period. I see that X is double when no data or just a few. Can it be integer?


Srihari Muthukaruppan [Syncfusion]
Replied On November 8, 2019 12:25 PM UTC

Hi Dan, 

Greetings from syncfusion. 

We have analyzed your query. From that, we would like to let you know that, we can achieve your requirement using “labelFormat” and “Interval” property in primaryXAxis of chart. Based on that we have prepared a sample for your reference. Please find the below sample and code snippet. 

Code Snippet: 
    <EjsChart> 
        <ChartPrimaryXAxis LabelFormat="n0" Minimum="15" Maximum="19" Interval="1"></ChartPrimaryXAxis> 
        <ChartSeriesCollection> 
            <ChartSeries DataSource="@chartData" XName="xValue" YName="yValue1" Opacity="1" Name="Germany" Fill="#1e90ff" Width=2 Type="ChartSeriesType.Column"> 
            </ChartSeries> 
        </ChartSeriesCollection> 
    </EjsChart> 
@code{ 
    public class DoubleData 
    { 
        public double xValue { get; set; } 
        public double yValue1 { get; set; } 
        public double yValue2 { get; set; } 
    } 
    public List<DoubleData> chartData = new List<DoubleData> 
        { 
                new DoubleData { xValue = 16, yValue1 = 2, yValue2= 7}, 
                new DoubleData { xValue = 17, yValue1 = 7, yValue2 = 8 }, 
                new DoubleData { xValue = 18, yValue1 = 10, yValue2 = 24 }, 
             }; 
} 

 
Screenshot: 
 
Note : Chart supports numeric value with double only. 
 
Let us know if you have any concerns. 

Regards 
Srihari M 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon