Skip to content
Snippets Groups Projects
Commit 9c733766 authored by esikkala's avatar esikkala
Browse files

ApexCharts config: support multiple result classes

parent a24d8333
No related branches found
No related tags found
No related merge requests found
......@@ -213,7 +213,9 @@ const ResultClassRoute = props => {
seriesTitle,
stroke,
fill,
createChartData
createChartData,
doNotRenderOnMount = false,
dropdownForResultClasses = false
} = resultClassConfig
const apexProps = {
portalConfig,
......@@ -235,7 +237,14 @@ const ResultClassRoute = props => {
seriesTitle,
stroke,
fill,
layoutConfig: props.layoutConfig
layoutConfig: props.layoutConfig,
doNotRenderOnMount,
dropdownForResultClasses
}
if (dropdownForResultClasses && has(resultClassConfig, 'resultClasses')) {
apexProps.resultClass = resultClassConfig.resultClasses[0]
apexProps.resultClasses = resultClassConfig.resultClasses
apexProps.dropdownForResultClasses = true
}
routeComponent = (
<Route
......
......@@ -9,7 +9,8 @@ import {
PieChart,
CloudDownload,
BubbleChart,
ShowChart
ShowChart,
FormatAlignJustify
} from '@material-ui/icons'
import has from 'lodash'
......@@ -24,7 +25,8 @@ const MuiIcon = props => {
PieChart: PieChart,
CloudDownload: CloudDownload,
BubbleChart: BubbleChart,
ShowChart: ShowChart
ShowChart: ShowChart,
FormatAlignJustify: FormatAlignJustify
}
if (has(MuiIcons, props.iconName)) {
const MuiIconComponent = MuiIcons[props.iconName]
......
......@@ -14,6 +14,12 @@ export const createPopUpContentDefault = ({ data, resultClass }) => {
link.textContent = data.prefLabel.prefLabel
link.style.cssText = 'cursor: pointer; text-decoration: underline'
h3.appendChild(link)
} else if (has(data, 'dataProviderUrl')) {
const link = document.createElement('a')
link.addEventListener('click', () => history.push(data.dataProviderUrl))
link.textContent = data.prefLabel.prefLabel
link.style.cssText = 'cursor: pointer; text-decoration: underline'
h3.appendChild(link)
} else {
h3.textContent = data.prefLabel.prefLabel
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment