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.

Format Y-axis in decimal

Thread ID:





117969 Jan 14,2015 06:17 AM Jan 15,2015 03:13 AM ASP.NET MVC 1
Tags: Chart
Asked On January 14, 2015 06:17 AM

Hi Team,
Below is my code which i use to show the chart.But my Y-axis data is not display in decimal format it show integer value.

                  .PrimaryXAxis(pr => pr.Title(tl => tl.Text(SyncFusionBarChartProp.xAxisTitle)).ValueType(AxisValueType.Category))
                  .PrimaryYAxis(pr => pr.Title(tl => tl.Text(SyncFusionBarChartProp.yAxisTitle)).ValueType(AxisValueType.Double).LabelFormat("{value}"))//want to display in decimal format.
                  .CommonSeriesOptions(cr => cr.EnableAnimation(true).Tooltip(tt => tt.Visible(true).Format("#series.name# <br/> #point.x# : #point.y#"))
                  .Marker(mr => mr.DataLabel(dt => dt.Visible(true).Angle(0).TextPosition(TextPosition.Top)
                  .Font(fn => fn.Color("#282828").Size("13px").FontFamily("Segoe UI")))))
                  .Series(sr =>
                      .DataSource((System.Collections.IEnumerable)ViewBag.datasource)//bind the data through viewbag
        .Title(t => t.Text(SyncFusionBarChartProp.ChartTitle))
        .Legend(lg => { lg.Visible(true).Position(LegendPosition.Bottom).Alignment(Syncfusion.JavaScript.DataVisualization.TextAlignment.Center); })
So please let me know how can i implement it.

Akbar Basha K M [Syncfusion]
Replied On January 15, 2015 03:13 AM

Hi Pankaj,

Thanks for using syncfusion product. We have analyzed your requirement. You can achieve this requirement using labelFormat property as follows,

Code Snippet:

PrimaryYAxis(pr => pr.LabelFormat("n1"))

We have prepared a sample based on your requirement. Please find the sample under the following location.

Sample Location: http://www.syncfusion.com/downloads/support/directtrac/117969/Label_Format1379665334.zip

Please let us know if you have any concern.


Akbar Basha KM


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.