react-apexcharts icon indicating copy to clipboard operation
react-apexcharts copied to clipboard

Issue with multi graphes rangeBar and line

Open HadjerSahariYassir opened this issue 2 years ago • 1 comments

Hi, i'm using react-appext chart , i want to draw a graph with bar ranges and also i want to make a line chart in same chart. i succeded to draw the rangeBar graph but i found issue to add the line , something similar to the following picture :

image

here is my code : export default function GraphDiffusion3({ allData, min, max, moy }) { const [data, setData] = useState([]); useEffect(() => { allData.map(elm => { if (elm < moy) { } else { } }); }); const state = { options: { chart: { type: "rangeBar", height: 350, }, tooltip: { enabled: false, enabledOnSeries: false, }, plotOptions: { bar: { horizontal: false, }, }, dataLabels: { enabled: true, formatter: function (val, opts) { console.log("value on label ", val); return val; }, }, annotations: { yaxis: [ { y: 50, borderColor: "#00E396", label: { borderColor: "#00E396", style: { color: "#fff", background: "#00E396", }, text: "moyenne = 50%", }, }, { y: 20, borderColor: "#00E396", label: { borderColor: "#00E396", style: { color: "#fff", background: "#00E396", }, text: "minimaum = 20%", }, }, { y: 95, borderColor: "#00E396", label: { borderColor: "#00E396", style: { color: "#fff", background: "#00E396", }, text: "maximaum = 95%", }, }, ], }, }, series: [ { data: [ { x: "Team A", y: [50, 95], }, { x: "Team B", y: [50, 80], }, { x: "Team C", y: [50, 40], }, { x: "Team D", y: [50, 30], }, ], }, ], }; return ( <div className="app"> <div className="row"> <div className="mixed-chart" style={{ width: "fit-content" }}> <Chart options={state.options} series={state.series} type="rangeBar" width="500" height={350} /> ); } Thanks in advance

HadjerSahariYassir avatar Oct 22 '23 14:10 HadjerSahariYassir

Your code doesn't work.

Dmarcotrigiano avatar Dec 03 '23 03:12 Dmarcotrigiano

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.

github-actions[bot] avatar Aug 03 '24 14:08 github-actions[bot]