Hello,
We are trying to migrate from exporter 2.x to 3.x-beta + Highchart 11+ and facing couple of issues.
One of them is unwanted container height/width CSS which doesn't reflect runtime changes to chart width/height.
Use case: we have horizontal line chart with dynamic amount of horizontal columns/bars. Based on the amount of bars we are calculating the total height of the chart in the callback function.
Due to this css styles we are getting our chart cut (I assume scrolling appears on real page).
Plz consider to make this styles optional or maybe completely remove.
Note that it worked as expected in exporter v2.x
Plz let me know if you need more info.
Thanks.
|
let injCSS = false; |
|
|
|
if (exportOptions.export.strInj) { |
|
const injCSS = document.createElement('style'); |
|
|
|
injCSS.textContent = ` |
|
#chart-container { |
|
height: ${chart.height}px; |
|
max-width: ${chart.width}px; |
|
} |
|
|
|
#chart-container #container{ |
|
height: ${chart.height}px; |
|
max-width: ${chart.width}px; |
|
} |
|
`; |
|
|
|
document.head.appendChild(injCSS); |
|
} |
|
|
|
createChart(chartOptions, exportOptions); |
|
|
|
// Remove the injected CSS |
|
if (injCSS) { |
|
document.head.removeChild(injCSS); |
|
} |
Hello,
We are trying to migrate from exporter 2.x to 3.x-beta + Highchart 11+ and facing couple of issues.
One of them is unwanted container height/width CSS which doesn't reflect runtime changes to chart width/height.
Use case: we have horizontal line chart with dynamic amount of horizontal columns/bars. Based on the amount of bars we are calculating the total height of the chart in the callback function.
Due to this css styles we are getting our chart cut (I assume scrolling appears on real page).
Plz consider to make this styles optional or maybe completely remove.
Note that it worked as expected in exporter v2.x
Plz let me know if you need more info.
Thanks.
node-export-server/templates/template.html
Lines 190 to 215 in fd0e4ed