Change color of axis label
Posted: Thu Nov 11, 2010 6:29 am
I would like to change the color of labels on axis.
I tested two codes below, but both of these did not works.
1)
chart.GetAxis().GetLeft().GetLabels().GetFont().SetColor(RGB(255, 0, 0));
chart.GetAxis().GetLeft().GetLabels().Add(1, "test");
2)
unsigned long idx = chart.GetAxis().GetLeft().GetLabels().Add(1, "test");
chart.GetAxis().GetLeft().GetLabels().GetItem(idx).SetColor(RGB(255, 0, 0));
How can I do it?
I tested two codes below, but both of these did not works.
1)
chart.GetAxis().GetLeft().GetLabels().GetFont().SetColor(RGB(255, 0, 0));
chart.GetAxis().GetLeft().GetLabels().Add(1, "test");
2)
unsigned long idx = chart.GetAxis().GetLeft().GetLabels().Add(1, "test");
chart.GetAxis().GetLeft().GetLabels().GetItem(idx).SetColor(RGB(255, 0, 0));
How can I do it?