You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Apexcharts (with Vue) to create a Pie chart, but I can't set the height specifically for the pie/plot area.
The docs describe the options.chart.height property, but that is used to set the height for the whole element. So it will also set the height for the legend wrapper.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using Apexcharts (with Vue) to create a Pie chart, but I can't set the height specifically for the pie/plot area.
The docs describe the options.chart.height property, but that is used to set the height for the whole element. So it will also set the height for the legend wrapper.
const options = { chart: { height: 98, sparkline: { enabled: true }, parentHeightOffset: 0, }, dataLabels: { enabled: false, }, theme: { monochrome: { enabled: true }, }, plotOptions: { pie: { customScale: 1, expandOnClick: false, offsetX: -64, donut: { size: 0, labels: { show: false, } } } }, stroke: { show: false, }, legend: { show: true, formatter: function(seriesName, opts) { return [opts.w.globals.series[opts.seriesIndex]] }, offsetX: 40, offsetY: 0, markers: { width: 4, height: 4, radius: 4, }, onItemClick: { toggleDataSeries: true }, onItemHover: { highlightDataSeries: true }, height: '100%', }, responsive: [ { breakpoint: 480, options: { chart: { height: 98, }, }, }, ], };
<VueApexCharts type="donut" :options="options" :series="series" />
Beta Was this translation helpful? Give feedback.
All reactions