Class ResultHighchart
Object
AbstractPortletDto
ResultHighchart
- All Implemented Interfaces:
Serializable
,Portlet
,ComplexCalculationResult
- Direct Known Subclasses:
ResultHighmap
public class ResultHighchart
extends AbstractPortletDto
implements ComplexCalculationResult
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
-
Field Summary
Fields inherited from class AbstractPortletDto
dragDropEnabled, layout, resizingEnabled
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionBy default, these modules are already available: boost, drilldown, exporting, export-data, heatmap, no-data-to-display, treemap.addResultMatrixTab
(ResultMatrix matrix) The automatically filled data tab can be replaced by customized ResultMatrix data.Not intended for public use, required for JSON serialization.Not intended for public use, required for JSON serialization.Not intended for public use, required for JSON serialization.Not intended for public use, required for JSON serialization.Not intended for public use, required for JSON serialization.boolean
Not intended for public use, required for JSON serialization.BETA
Allows to define events that will be triggered when the user clicks in the chart/map.setDataHeaders
(String... headers) To override the default column headers of the data tab table.setResultMatrixTabs
(ResultMatrix... matrices) The automatically filled data tab can be replaced by customized ResultMatrix data.setShowDataTab
(boolean show) Show a tab set, with the chart in the first tab, and data grids in the other tabs.Short forsetShowDataTab(true)
Methods inherited from class AbstractPortletDto
layout, setLayout, value, withDragDrop, withHeight, withHeight, withLayout, withLayout, withLayout, withResizing, withWidth, withWidth
-
Constructor Details
-
ResultHighchart
Not intended for public use. Using this constructor will not fully initialize the instance, please preferapi.buildHighchart()
.- See Also:
-
-
Method Details
-
getChartDefinition
Not intended for public use, required for JSON serialization. -
addModule
By default, these modules are already available: boost, drilldown, exporting, export-data, heatmap, no-data-to-display, treemap. If your chart requires additional modules, they can be specified here. The application ensures the files load only once.Note regarding the "boost" module: The Highcharts documentation states that it is enabled by default, but in Pricefx you will need to explicitly set the option
boost.enabled = true
- Parameters:
modules
- one or more Highcharts module names, without the path and without the ".js" extension. e.g. "annotations", "funnel", "variwide"- Returns:
- the
ResultHighchart
instance, for convenience - See Also:
-
getModulesList
Not intended for public use, required for JSON serialization. -
setShowDataTab
Show a tab set, with the chart in the first tab, and data grids in the other tabs. By default, a single grid will be shown by extracting the data using the native JavaScript Highcharts API. The headers of this grid can be customized viasetDataHeaders()
, or the whole grid can be provided in aResultMatrix
instance viasetResultMatrixTabs()
. Note that for convenience, callingsetDataHeaders()
,setResultMatrixTabs()
, oraddResultMatrixTab()
will set this to true.- Parameters:
show
- Data tab will be shown if set to true. Default is false.- Returns:
- the
ResultHighchart
instance, for convenience - See Also:
-
showDataTab
Short forsetShowDataTab(true)
- Returns:
- the
ResultHighchart
instance, for convenience
-
getShowDataTab
public boolean getShowDataTab()Not intended for public use, required for JSON serialization. -
setDataHeaders
To override the default column headers of the data tab table. For convenience, this will also callsetShowDataTab(true)
- Parameters:
headers
- One or more header labels, left to right- Returns:
- the
ResultHighchart
instance, for convenience
-
getDataHeaders
Not intended for public use, required for JSON serialization. -
setResultMatrixTabs
The automatically filled data tab can be replaced by customized ResultMatrix data. It's even possible to add multiple tabs by providing multiple ResultMatrix instances. Make sure to set a title viaResultMatrix.setTitle()
as this will be used for the tab label. Note that:- This method will overwrite any previously set or added
ResultMatrix
- For convenience, this will also call
setShowDataTab(true)
- Parameters:
matrices
- One or more ResultMatrix instances to display in the tab set- Returns:
- the
ResultHighchart
instance, for convenience - See Also:
- This method will overwrite any previously set or added
-
addResultMatrixTab
The automatically filled data tab can be replaced by customized ResultMatrix data. It's even possible to add multiple tabs by providing multiple ResultMatrix instances. Make sure to set a title viaResultMatrix.setTitle()
as this will be used for the tab label. Note that:- This method will not overwrite previously set or added
ResultMatrix
- For convenience, this will also call
setShowDataTab(true)
- Parameters:
matrix
- Add one ResultMatrix instance to display in its own tab- Returns:
- the
ResultHighchart
instance, for convenience - See Also:
- This method will not overwrite previously set or added
-
getResultMatrixList
Not intended for public use, required for JSON serialization. -
getResultType
- Specified by:
getResultType
in interfaceComplexCalculationResult
-
onPointClick
BETA
Allows to define events that will be triggered when the user clicks in the chart/map.
Example:
This allows to refresh an embedded dashboard:def chart = api.buildHighchart(definition) chart.onPointClick().triggerEvent(api.dashboardWideEvent("eventName")) .withNameAsEventDataAttr().withCustomEventDataAttr("value") return chart
return api.dashboard("embeddedDashboardName") //.setParam("country_name", input.Country) //.setParam("country_revenue", input.Revenue) .showEmbedded() .andRecalculateOn(api.dashboardWideEvent("eventName")) .withEventDataAttr("name").asParam("country_name) .withEventDataAttr("value").asParam("country_revenue")
-
getEvents
Not intended for public use, required for JSON serialization.
-