Search results

Internationalization in ASP.NET Core Chart control

14 Apr 2021 / 1 minute to read

Chart provide supports for internationalization for below chart elements.

  • Datalabel.
  • Axis label.
  • Tooltip.

For more information about number and date formatter you can refer internationalization.


Globalization is the process of designing and developing an component that works in different cultures/locales. Internationalization library is used to globalize number, date, time values in Chart component using labelFormat property in axis.

Numeric Format

In the below example axis, point and tooltip labels are globalized to EUR.

Copied to clipboard
<ejs-chart id="container" width="60%" title="Average Sales Comparison">
        <e-chart-tooltipsettings enable="true" format="${} <br>${point.x} : ${point.y}"></e-chart-tooltipsettings>
        <e-chart-primaryxaxis title="Year"></e-chart-primaryxaxis>
        <e-chart-primaryyaxis labelFormat="c" title="Sales Amount in Millions"></e-chart-primaryyaxis>
            <e-series dataSource="ViewBag.dataSource" xName="x" yName="y" type="@Syncfusion.EJ2.Charts.ChartSeriesType.Column" name="Product X"></e-series>
            <e-series dataSource="ViewBag.dataSource" xName="x" yName="y1" type="@Syncfusion.EJ2.Charts.ChartSeriesType.Column" name="Product Y"></e-series>
Copied to clipboard
public ActionResult Index()
            List<InternalChartData> chartData = new List<InternalChartData>
             new InternalChartData {x= 1900, y= 4,   y1= 2.6 },
             new InternalChartData{ x= 1920, y= 3.0, y1= 2.8 },
             new InternalChartData{ x= 1940, y= 3.8, y1= 2.6},
             new InternalChartData{ x= 1960, y= 3.4, y1= 3 },
             new InternalChartData{ x= 1980, y= 3.2, y1= 3.6 },
             new InternalChartData{ x= 2000, y= 3.9, y1= 3 }
            ViewBag.dataSource = chartData;
            return View();
        public class InternalChartData
            public double x;
            public double y;
            public double y1;