Interface CommonHighchartBuilder
- All Superinterfaces:
GenericHcObject
- All Known Subinterfaces:
CustomHighchartBuilder
,HighchartBuilder
- Since:
- 3.10.2
-
Method Summary
Modifier and TypeMethodDescriptionvoid
render
(HtmlContentBuilder builder, Integer height, Integer width) Renders chart to parent builder.Renders chart.
This method can be useful in Velocity.useRelativeWidth
(Double width) Specifies relative width of the chart.Methods inherited from interface com.polarion.alm.shared.api.utils.charts.highcharts.GenericHcObject
addCustomStringAttribute, addRawAttribute
-
Method Details
-
render
Renders chart.
This method can be useful in Velocity.#set($chart = $widgetContext.createChartBuilder()) #set($pie = $chart.pie().name("Name")) ##... $!chart.build().render(300, $widgetContext.columnWidth)
Warning: Using
null
forwidth
will make the chart non exportable to PDF. If used inside Rich Page Widget thenRichPageWidgetCommonContext.columnWidth()
should be called instead.RichPageWidgetRenderingContext.target().isPdf()
can be used for PDF export detection.- Parameters:
height
- height of chartwidth
- width of chart in pixels ornull
to make the chart as wide as possible (but see warning above). This parameter will be ignored for rendering in browser ifuseRelativeWidth(Double)
was used
-
useRelativeWidth
Specifies relative width of the chart. It is applicable only for case when chart is rendered in a browser.
Should be called beforerender(HtmlContentBuilder, Integer, Integer)
orrender(Integer, Integer)
- Parameters:
width
- width in percentages, null means that relative width will not be used- Returns:
- this