apexcharts / ng-apexcharts

ng-apexcharts is an implementation of apexcharts for angular. It comes with one simple component that enables you to use apexcharts in an angular project.
MIT License
327 stars 81 forks source link

cant plot the y axis values in scatter plot categories values x axis values are plotted but y axis values are not showing instead is showing numbers when created #221

Closed Brane105 closed 3 months ago

Brane105 commented 2 years ago

dummy arrays example : plant_arr = ["abc","dbc","asd"] opr_no_arr = ["company1","company2","company3"] draft_arr = [0:{x:"abc",y:"comapny1"},1:{x:"bds",y:"comapny2"},2:{x:"dbc",y:"comapny3"}] Pending For Creation = [0:{x:"abc",y:"comapny1"},1:{x:"bds",y:"comapny2"},2:{x:"dbc",y:"comapny3"}] Created = [0:{x:"abc",y:"comapny1"},1:{x:"bds",y:"comapny2"},2:{x:"dbc",y:"comapny3"}] name: "Pending For Creation", data: draft_arr, color:"#000000" },{ name: "Created", data: created_arr, color:'#FF0000' },{ name: "Execution In Progress", data: execution_arr, color:'#FFAE42' }, { name: "Completed", data: completed_arr, color:'#28a745' }], chart: { height: 350, type: 'scatter', zoom: { enabled: true, type: 'xy' }, }, xaxis: { type: 'category', //tickAmount: 10, categories: plant_arr, }, this is working yaxis: { //type: 'category', // tickAmount:1, // categories : opr_no_arr, labels: { maxWidth: "auto", formatter: (val : string, index) => opr_no_arr[index], //error cant show particaular labels }, title: { text: "OPR", style: { colors: "#000000" } } }, legend: { position: "top", horizontalAlign: "right" } }; this.first_chartRef = new ApexCharts(document.getElementById('first'), chartOptions); this.first_chartRef.render(); }

github-actions[bot] commented 3 months ago

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.