Asp.net chart control IsValueShownAsLabel and label will display values with $ symbol

StackOverflow https://stackoverflow.com/questions/14191826

  •  13-01-2022
  •  | 
  •  

سؤال

I have set IsValueShownAsLabel to true in asp.net chart control. I am trying to show these visible lables as $100.00 instead of showing only numerics like 100.00 or so.

Is there any way as I understand that only numerics can be visible as lables.

هل كانت مفيدة؟

المحلول

chartSeries.LabelFormat = "${0.00}";

solved my problem

Edit: The most professional way with hints from prthrokz's comment to the question.

chartSeries.LabelFormat = "{0:C}";
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top