google visualization - How to change ControlWrapper Category filter ui.caption text color based on the caption? -
how change controlwrapper category filter ui.caption text color based on caption? tried following code,but not works.
var category_picker = new google.visualization.controlwrapper({ 'controltype': 'categoryfilter', 'view': {'columns': [1,2,3,4,7,8]}, 'containerid': 'category_filter_container', 'options': { 'filtercolumnlabel': 'p/a', 'ui': { 'matchtype':'any', 'label': '', 'caption':'all', 'labelstacking': 'horizontal', 'allowtyping': false, 'allowmultiple': false, 'cssclass':'category_picker_class' } }, 'state':{'selectedvalues':['a']} }); var table = new google.visualization.chartwrapper({ 'charttype': 'table', 'containerid': 'summary_details_table', 'options': {'allowhtml': true,'alternatingrowstyle':true,'width':'100%','height':'600px'} }); // create dashboard. var data_dashboard = new google.visualization.dashboard(document.getelementbyid('summary_details_table')).bind(category_picker, table).draw(view); $(".category_picker_class").css({"color":"red"});
try wrapping jquery inside "ready" event handler control, control doesn't exist @ time try set css:
google.visualization.events.addlistener(category_picker, 'ready', function () { $(".category_picker_class .charts-menu-button-caption").css({"color":"red"}); });
place event handler in between creating categorypicker , drawing dashboard. jsfiddle example
Comments
Post a Comment