echarts Invisible y axis

qmelpv7a  于 2022-10-26  发布在  Echarts
关注(0)|答案(3)|浏览(239)

Version

5.0.2

Steps to reproduce

https://echarts.apache.org/v4/examples/en/editor.html?c=line-simple

https://echarts.apache.org/examples/en/editor.html?c=line-simple

What is expected?

This is basic example from v4 https://echarts.apache.org/v4/examples/en/editor.html?c=line-simple and there y axis line is visible but in all examples from latest version y axis line is invisible
https://echarts.apache.org/examples/en/editor.html?c=line-simple .

What to do to get the line back?

What is actually happening?

I updated my project from version 4 to the latest and now there is no Y-axis line in the charts

brc7rcf0

brc7rcf01#

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure thatyou have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list .

Have a nice day! 🍵

watbbzwu

watbbzwu2#

@dzik1331 Hi, this seems to be the expected result. The y-axis is hidden when x-axis's type is value or log by default.

you can check this commit which introduces this logic: 4acb689

Also, you can force the y-axis to show by implicity setting axisTick.show and axisLine.show to true. like this:

option = {
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        show:true,
        type: 'value',
        axisTick:{
          show:true,  
        },
        axisLine:{
            show: true
        },
    },
    series: [{
        data: [150, 230, 224, 218, 135, 147, 260],
        type: 'line'
    }]
};

mi7gmzs6

mi7gmzs63#

@dzik1331 Hi, this seems to be the expected result. The y-axis is hidden when x-axis's type is value or log by default.

this is not exactly true! apparently, even xAxis.type = 'time' causes the yAxis axisLine to disappear too; and this although the default value is allegedly set to true (https://echarts.apache.org/en/option.html#yAxis.axisLine.show)

相关问题