Skip to content

Commit

Permalink
Merge pull request #2092 from statisticsnorway/MIMIR-1833-2-fix-hight…
Browse files Browse the repository at this point in the history
…-for-several-sources

MIMIR-1833 Fixed highchart export with more than 2 sources
  • Loading branch information
annesiri authored Sep 13, 2023
2 parents 25d4da3 + 6631932 commit b8921c4
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/main/resources/lib/ssb/parts/highcharts/graph/config.es6
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,17 @@ export const createDefaultConfig = (highchartData, displayName, language) => ({
'#000000',
],
credits: {
position: {
align: 'left',
x: 10,
y: -25,
},
text: highchartData.creditsText,
href: highchartData.creditsHref,
style: {
color: '#00824d',
fontSize: '16px',
},
enabled: !!highchartData.sourceList,
},
exporting: {
chartOptions: {
chart: {
spacingBottom: 10 + ensureArray(highchartData?.sourceList).length * 40,
spacingBottom: 10 + ensureArray(highchartData?.sourceList).length * 20,
},
xAxis: {
labels: {
step: 1,
},
},
credits: {
enabled: !!highchartData.sourceList,
Expand All @@ -94,12 +88,18 @@ export const createDefaultConfig = (highchartData, displayName, language) => ({
combinedSources +
`<b style="color:#274247">${localize({
key: 'source',
locale: language ? language : 'nb',
locale: language ?? 'nb',
})}: </b>${currentSource.sourceText}</br>`
)
}, ''),
position: {
y: -30,
align: 'left',
x: 10,
y: -10 - (ensureArray(highchartData?.sourceList).length - 1) * 20,
},
style: {
color: '#00824d',
fontSize: '16px',
},
},
},
Expand Down

0 comments on commit b8921c4

Please sign in to comment.