Search code examples
labelechartsyaxis

How to center the Y axis label in scatter chart?


Currently the Y axis labels are align with the "axisLine":

not centered

Is there a way to make them row centered like in the photo:

centered

Default example of scatter chart: https://echarts.apache.org/examples/en/editor.html?c=scatter-simple


Solution

  • I found the solution for my problem when I changed the yAxis type to "category":

    yAxis: {type:"category"}