Reputation: 800
I want to customize the classes in Google Charts.
As far as I'm concerned, there are two options that I've stumbled upon. The first option is:
!important;
to override the rule. This option seems very "ugly", because forcing the class to have an !important;
state is just ugly..charts-menu-button, .charts-menu-button-inner-box { width: 200px; line-height: 55px; border: 0 !important; padding: 0 !important; }
options: { ui: { cssClass: {} } }
What I don't understand is when I'm going with the second option, absolute nothing happens to the class I want to customize.
So my question is: What am I doing wrong here, and is there any other way?
Upvotes: 4
Views: 9067
Reputation: 8420
Set the cssclassnames in options for the chart as below. Define the classes in the css file. Below example is for table chart.
chart1.options = {
// title: "User Chart",
displayExactValues: true,
'showRowNumber': false,
'allowHtml': true,
is3D: true,
// 'height' : '350px',
cssClassNames : {
headerRow :'tableChartHeaderRow',
hoverTableRow : 'tableChartHeaderRowHighlightedState'
}
};
Upvotes: 3