Skip to content

Column Chart formatting

New Discussion
Andrew Wigglesworth
Andrew Wigglesworth asked on Jan 28, 2025 6:40 AM

I have a simple category chart created. I’m trying to format the label, tooltip and numeric values as currency format but i can’t find where to do it using the Asp.Net MVC Helper.

Here’s the code:

<div id="columnChart" class="chart">
@(
Html.Infragistics()
.DataChart(Model.ChartSummary.AsQueryable())
.ID("WeeklyPayments")
.Width("100%")
.Height("400px")
.Title("Payments last 7 days")
.Legend(legend => legend.ID("legend"))
.Axes(axes =>
{
axes.CategoryX("xAxis")
.Label(item => item.FormattedDate);
axes.NumericY("yAxis")
.Title("$ Payment Totals");
})
.Series(series =>
{
series.Column("Payment Type").ValueMemberPath(item=>item.CreditCardAmount).Title("Credit Card").XAxis("xAxis").YAxis("yAxis").ShowTooltip(true);
series.Column("IVR").ValueMemberPath(item => item.IVRAmount).Title("IVR").XAxis("xAxis").YAxis("yAxis").ShowTooltip(true);
series.Column("Check").ValueMemberPath(item => item.CheckAmount).Title("Check").XAxis("xAxis").YAxis("yAxis").ShowTooltip(true);
series.Column("Other").ValueMemberPath(item => item.OtherAmount).Title("Other").XAxis("xAxis").YAxis("yAxis").ShowTooltip(true);
})
.DataBind()
.Render()
)
</div>
<div id="legend" class="legend"></div>

 

I would like the Legend, and tooltips to display in a currency format ie. $10.00

Sign In to post a reply

Replies

  • 0
    Michael DiFilippo
    Michael DiFilippo answered on Sep 1, 2023 1:19 PM

    Hello and thank you for contacting Infragistics. You can hook the formatLabel event to modify each axis label. For the tooltips and legends I recommend using the new DataTooltip/DataLegend 

    eg.

    https://www.igniteui.com/help/igdatachart-configuring-datalegend

    https://www.igniteui.com/help/igdatachart-configuring-datatooltip 

    Let me know if you have any questions.

  • 0
    Michael Owen
    Michael Owen answered on Oct 1, 2024 10:13 AM

    To format labels, tooltips, and numeric values as currency in ASP.NET MVC, you can use the [DisplayFormat(DataFormatString = "{0:C}")] attribute in your model. This ensures the values are displayed in the correct currency format.

    For more tips on working with content or media, inshot mod apk could be a useful tool for quick video edits.

    Hope this helps!

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Andrew Wigglesworth
Favorites
0
Replies
2
Created On
Jan 28, 2025
Last Post
1 year, 11 months ago

Suggested Discussions

Created by

Created on

Jan 28, 2025 6:40 AM

Last activity on

Feb 24, 2026 2:07 PM