Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Highcharts font size

I'm looking at using HighCharts for a webpage, specifically:

http://www.highcharts.com/demo/column-basic/dark-green

However, the font sizes are too small. I've tried adding:

legend: {
        itemStyle: {
            color: '#000000',
            fontWeight: 'bold',
            fontSize: '15px'
        }

to my js file that the site provided but this doesn't result in a font size change. Additionally I would also like to increase the size of the key (where it states Tokyo, New York, London, Berlin). This is my first time using Highcharts and I've been doing research for a couple hours now and I can't seem to find the answer. Any help would be much appreciated!

like image 906
Ryan Sayles Avatar asked Jul 17 '13 18:07

Ryan Sayles


People also ask

How do I change the font in Highcharts?

Re: Changing Font There is no one place you can change the fonts for all text, instead change options. title. style. font, options.

What is legend in Highcharts?

The legend displays the series in a chart with a predefined symbol and the name of the series. Series can be disabled and enabled from the legend.

What is the default font in R?

With this function, you can define additional font families to use in your R base graphic plots. The default font families are 'sans', 'serif' and 'mono'.


1 Answers

For legend font size, your code is working perfect. Here is working demo.

and for X-axis and Y-axis,put the font size in (x-Axis/y-Axis)->labels->style object: Here is the sample :

 xAxis: {
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
            labels: {
                style: {
                    color: 'red',
                    fontSize:'15px'
                }
            }
        },

Demo :http://jsfiddle.net/4VznG/

like image 97
Nishu Tayal Avatar answered Oct 10 '22 14:10

Nishu Tayal