Open dlopesa opened 2 months ago
Edit: Sorry, it looks like you've seen these. You can set the height of the charts independently via the usual chart.height
option.
Take a look at: https://apexcharts.com/docs/chart-types/synchronized-charts/ and the example here: https://apexcharts.com/javascript-chart-demos/line-charts/syncing-charts/
I tried using those but onced they are grouped by the height is always the same, even if I try to make them diferent, it will assume only on of them
Are you (or some wrapper) setting the height globally in window.Apex
and it's overriding perhaps?
Here's one of the examples from those pages where I gave the two charts different chart.height
values.
Here's the HTML file:
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-10">
<div id="chart-line"></div>
<div id="chart-area"></div>
</div>
</div>
</div>
<script>
var optionsLine = {
series: [{
data: [[0, 23], [1, 24], [2, 15], [3, 25]]
}],
colors: ['#00E396'],
chart: {
id: 'line-1',
group: 'social',
type: 'line',
height: 250
},
yaxis: {
labels: {
minWidth: 40
}
}
};
var chart = new ApexCharts(document.querySelector("#chart-line"), optionsLine)
chart.render()
var optionsArea = {
series: [{
data: [[0, 23], [1, 24], [2, 15], [3, 25]]
}],
colors: ['#008FFB'],
chart: {
id: 'area-1',
group: 'social',
type: 'area',
height: 150
},
yaxis: {
labels: {
minWidth: 40
}
}
};
var chart = new ApexCharts(document.querySelector("#chart-area"), optionsArea)
chart.render()
</script>
</body>
</html>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Summary
I need two graphs to share zooms and tooltip like the sync but having different heights. Is there away? could it be addes?
Intended Use Case
For example![image](https://github.com/apexcharts/apexcharts.js/assets/39463084/558436f4-d50c-47a1-8b94-567c84f4d4a5)