Does anyone know a way to change the font size of these dates? I want to make them a little smaller so they will all fit instead of skipping one each time..
Google charts change haxis font size
Asked Answered
Try with:
options:{
hAxis : {
textStyle : {
fontSize: 7 // or the number you want
}
}
}
Is there any document for other options ? I want to underline and change cursor to pointer. –
Shenyang
@SunilGarg you mean change cursor in the chart canvas? You can do that with css. You want to underline the text? –
Raoul
Thanks @juvian. I have done this on ready event of chart #38394472 –
Shenyang
I fixed this issue using below code:
titleTextStyle -- An object that specifies the title text style. The object has this format:
var options = {
title: 'Chart Name ',
width: '100%',
height: '100%',
legend: {
position: "none"
},
hAxis: {
title: 'Request Status',
titleTextStyle: {
color: "#000",
fontName: "sans-serif",
fontSize: 11,
bold: true,
italic: false
}
},
vAxis: {
title: 'Amount requested ($)',
titleTextStyle: {
color: "#000",
fontName: "sans-serif",
fontSize: 11,
bold: true,
italic: false
}
},
annotations: {
alwaysOutside: true,
textStyle: {
fontSize: 14,
auraColor: 'none'
}
}
};
More details from Google Chart
Happy coding...
No percentage or "em" values for fontSize yet, only integer pixel values are supported at the moment in case anyone needed something else. –
Kc
© 2022 - 2024 — McMap. All rights reserved.