Need to change font size and font color in chart label

by npugazhendhi » Thu Apr 21, 2016 7:19 am

Hi
I would like to change the font color and font size inside the chart label because if I use char color as Black the label font is also back so the label font is not visible to us. can we change the label font color and size ?
Attachments
needtochangelabelfontcolorandsize.png
needtochangelabelfontcolorandsize.png (13.42 KiB) Viewed 804 times
npugazhendhi
 
Posts: 19
Joined: Wed Apr 20, 2016 11:27 am

by Rostislav » Thu Apr 21, 2016 10:46 am

Hi,

In Dashboard -> Advanced -> preRender
Code: Select all
//set default font color to white
config.seriesDefaults.labels.color = "white";

//set default font -- cannot be bigger than the container it seems
config.seriesDefaults.labels.font = "14px Arial,Helvetica,sans-serif";

//set the color of the first series labels to red
config.series[0].labels = {};
config.series[0].labels.color = "red";
User avatar
Rostislav
 
Posts: 61
Joined: Fri Oct 09, 2015 10:51 am

by npugazhendhi » Thu Apr 21, 2016 11:53 am

hi

Thanks. it work nice.

But how to change the style/color of the Legend text ?
Attachments
legend_textfontstyle.png
legend_textfontstyle.png (12.34 KiB) Viewed 800 times
legend_textfontstyle.png
legend_textfontstyle.png (12.34 KiB) Viewed 800 times
npugazhendhi
 
Posts: 19
Joined: Wed Apr 20, 2016 11:27 am

by Rostislav » Thu Apr 21, 2016 12:03 pm

Code: Select all
  config.legend.labels = {};
  config.legend.labels.color = "red";
  config.legend.labels.font = "10px Arial,Helvetica,sans-serif";
User avatar
Rostislav
 
Posts: 61
Joined: Fri Oct 09, 2015 10:51 am

by npugazhendhi » Fri Apr 22, 2016 6:25 am

hi,

Please let me know how to edit the font settings (colour/bold/size) of the x axis labels.?

screenshot attached.
Attachments
xaxislabel_fontstylechange.png
xaxislabel_fontstylechange.png (9.12 KiB) Viewed 792 times
npugazhendhi
 
Posts: 19
Joined: Wed Apr 20, 2016 11:27 am

by Rostislav » Fri Apr 22, 2016 12:48 pm

Code: Select all
config.categoryAxis.labels.color = "red";
config.categoryAxis.labels.font = "bold 10px Arial,Helvetica,sans-serif";
User avatar
Rostislav
 
Posts: 61
Joined: Fri Oct 09, 2015 10:51 am

by npugazhendhi » Tue Apr 26, 2016 6:05 am

Thanks a lot. it worked well.
npugazhendhi
 
Posts: 19
Joined: Wed Apr 20, 2016 11:27 am


Return to Dashboard Designer for SharePoint 2013