ApexCharts.jsのScatter ChartでY軸の値にに数値ではなく指定Stringのみ表示させたい

javascript

1 Options.chart = { type : 'scatter', zoom : { enabled : false } };2 // grid3 Options.grid ={4 xaxis: { lines: { show: true } },5 yaxis: { lines: { show: true } },6 }7 // xaxis8 Options.xaxis ={9 type: 'datetime', 10 min: '00:00',11 max: '23:59',12 labels: { 13 show: true,14 datetimeFormatter: { hour: 'HH:mm'}15 },16 };17 // yaxsis18 Options.yaxis ={ 19 type: 'string',20 tickPlacement: 'on',21 show: true,22 categories: [23 'South Korea',24 'Canada',25 'United Kingdom',26 'Netherlands',27 'Italy',28 'France',29 'Japan',30 'United States',31 'China',32 'Germany'33 ],34 };35 36 Options.series = {37 data: [38 { x : "00:00", y : 'South Korea', },39 { x : "01:00", y : 'Canada', },40 { x : "02:30", y : 'Italy', },41 { x : '04:15', y : 'China', },42 { x : "25:59", y : 'France', },43 ]44 };45 46 47var chart = new ApexCharts( document.querySelector("#chart"), Options );48chart.render();

コメントを投稿

0 コメント