Interface CustomHighchartBuilder
- All Superinterfaces:
CommonHighchartBuilder
,GenericHcObject
Builder which uses custom chart options to build a chart.
- Since:
- 3.10.2
-
Method Summary
Modifier and TypeMethodDescriptioncheckJavaScriptExceptions
(String errorMessage) Creates additional JavaScript block which will check if there are some errors occurred while chart creation.defaultOptions
(String options) Uses JavaScript Highcharts.setOptions(...) method to set user definedoptions
before chart creation.Sets custom chart options.useRelativeWidth
(Double width) Specifies relative width of the chart.Methods inherited from interface com.polarion.alm.shared.api.utils.charts.highcharts.CommonHighchartBuilder
render, render
Methods inherited from interface com.polarion.alm.shared.api.utils.charts.highcharts.GenericHcObject
addCustomStringAttribute, addRawAttribute
-
Method Details
-
useRelativeWidth
Description copied from interface:CommonHighchartBuilder
Specifies relative width of the chart. It is applicable only for case when chart is rendered in a browser.
Should be called beforeCommonHighchartBuilder.render(HtmlContentBuilder, Integer, Integer)
orCommonHighchartBuilder.render(Integer, Integer)
- Specified by:
useRelativeWidth
in interfaceCommonHighchartBuilder
- Parameters:
width
- width in percentages, null means that relative width will not be used- Returns:
- this
-
options
Sets custom chart options. Example:{ chart: { type: 'areaspline' }, title: { text: 'Example title' } }
- Parameters:
options
- chart options- Returns:
- this CustomHighchartBuilder instance
-
defaultOptions
Uses JavaScript Highcharts.setOptions(...) method to set user definedoptions
before chart creation. Method can be called multiple times and will use all parameters defined earlier. Example:{ 'credits': {'enabled': false, 'href':null}, 'exporting': {'enabled': false}, 'tooltip': {'backgroundColor': 'rgba(247, 247, 247, 0.9)'}, 'yAxis': {'gridLineWidth': 0}, 'title': {'useHTML': true}, 'plotOptions': {'series': {'animation': false}} }
- Returns:
- this
-
checkJavaScriptExceptions
Creates additional JavaScript block which will check if there are some errors occurred while chart creation. This block will add anerrorMessage
to chart div with some explanations to the user.- Returns:
- this
-