series.Column("ClosePrice") .XAxis("EnergyProductAxis") .YAxis("PriceAxis") .IsHighlightingEnabled(true) .IsTransitionInEnabled(true) .ValueMemberPath(v => v.CurrentMidPrice).to .ShowTooltip(true) .Brush("#F50512") .TransitionInMode(CategoryTransitionInMode.FromZero) .TransitionDuration(1000) .TransitionInDuration(1000) .TransitionInSpeedType(TransitionInSpeedType.Normal) .Title("Close Price (£/MWh)").Legend(legend => legend.ID("legend1"));
this sometimes displays no decimal places and sometime 2, I need it to consistently show 2 decimal places
so
54.00
65.35
etc
Please let me know if you have further questions on the matter, I will be glad to help
Hi Mark,
If you want to format numbers that are displayed as labels, then you need to use the formatLabel method:
axes.FormatLabel("function(item) { return formatCurrency(item); }");
function formatCurrency(item) {
// code to format the value return formattedVal;}
If you would rather want to format the series values that are being displayed in a tooltip, you can format those in the tooltipShowing or tooltipShown event.