Hi Inhyuk,
You can use a custom value formatter for this purpose - for example:
public class NCustomValueFormatter : NValueFormatter
{
public override string FormatValue(object value)
{
double dValue = (double)value;
double millions = dValue / 1000000;
if (millions > 1)
{
return ((int)millions).ToString() + "M";
}
double thousands = dValue / 1000;
return ((int)thousands).ToString() + "K";
}
}
private void Form1_Load(object sender, EventArgs e)
{
NChart chart = nChartControl1.Charts[0];
NBarSeries bar = new NBarSeries();
bar.Values.Add(1200000);
bar.Values.Add(1100000);
bar.Values.Add(1000000);
chart.Series.Add(bar);
NLinearScaleConfigurator scale = chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator as NLinearScaleConfigurator;
scale.LabelValueFormatter = new NCustomValueFormatter();
nChartControl1.Refresh ();
}
Let me know if you meet any problems.
Best regards,
Bob