Mixed Chart Multiple yaxis with negative value behaviour #4441
fctdev2024
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to make a mixed chart with 2 lines and 1 bar chart with multiple yaxis. I want the bar chart to have the negative value behavior starting from the middle using the second yaxis (0%). Still no luck. How the yaxis min and max function works?
Any clue?
data: { series: [{ name: "test1", data: [100000, 105000, 107000, 101650, 97650] }, { name: "test2", type: 'bar', data: [100000, 104000, 107500, 101650, 97650] }, { name: 'test3', data: [95000, 99750, 101650, 99750, 97650] } ], chartOptions: { chart: { height: 672, type: 'line', zoom: { enabled: false }, }, dataLabels: { enabled: false }, stroke: { width: [5, 0, 5], curve: 'smooth', dashArray: [0, 0, 5] }, xaxis: { categories: ['01 Jan', '02 Jan', '03 Jan', '04 Jan', '05 Jan' ], tickPlacement: 'between', }, yaxis: [ { seriesName: ['test1', 'test2'], min: 85000, max: 115000, tickAmount: 6, labels:{ formatter: (value) => { return '$' + numberWithCommas(value); }, } }, { seriesName: 'test3', min: 85000 || function(min){return (min - 100000) / 10000}, max: 115000 || function(max){return (max - 100000) / 10000}, tickAmount: 6, show: true, opposite: true, labels:{ formatter: (value) => { return (value - 100000) / 10000 + '%'; }, } } ], colors: ['#546E7A', '#4CAF50', '#FF0000'], fill: { opacity: [1, 0.2, 1] }, grid: { borderColor: '#f1f1f1', }, }, }
Beta Was this translation helpful? Give feedback.
All reactions