ccrabb Posted January 8, 2013 Share Posted January 8, 2013 I am looking to customize a few things about how the ad-hoc editor renders charts. Two particular items are to:1.) customize the color palette used for the bars/columns.2.) remove the rendering of a legendHow do I do this? The concept of Chart themes do not appear to have any impact upon ad hoc charts (and I can see this mentioned in the admin guide: "Chart themes do not apply to Ad Hoc chart views"). And my attempts to make use of the defaultTheme property in applicationContext-adhoc.xml don't seem to impact anything. From looking in the code, I am wondering if the themes defined in the ad hoc directory (i.e. ocean, olive, forest, etc...) are no longer used in 5.0.1 anyway.Can anyone shed some light here?Thanks! Link to comment Share on other sites More sharing options...
Yuriy Plakosh Posted January 9, 2014 Share Posted January 9, 2014 1) You can modify default color palette used for Ad Hoc View based charts in scripts/adhoc/highchart.datamapper.js file: // // the highcharts default color palette // colors: [ '#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE', '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92' ], You can modify these colors, add new and/or remove existing ones. 2) You can disable legend by adding legend: { enabled: false },option to default options used in scripts/adhoc/highcharts.api.js file: var highchartsOptions = { chart: { renderTo: 'chartContainer', zoomType: 'xy', jrstype: chartState.chartType, type: HighchartsDataMapper.cast[chartState.chartType] }, legend: { enabled: false }, credits: { enabled: false }, tooltip: { valueDecimals: 2 }, title: { // Skip internal Highcharts title. text: null } };Have in mind that changes will be applied to all Ad Hoc View based charts. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now