apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.61k stars 19.62k forks source link

echarts4 update to echarts5 questions #15301

Closed zhoufanglu closed 2 years ago

zhoufanglu commented 3 years ago

Version

5.1.2

Reproduction link

https://ecomfe.github.io/echarts-issue-helper/

Steps to reproduce

npm echarts4 update to echarts5

          axisLabel: {
            textStyle: {
              color: '#999', //坐标轴字颜色
              fontSize: '1rem'
            },
          },

What is expected?

I want to no warning

What is actually happening?

[ECharts] DEPRECATED: textStyle hierarchy in axisLabel has been removed since 4.0. All textStyle properties are configured in axisLabel directly now. image


4->5,What should we pay attention to when we upgrade the API? The content of the report's warning is almost impossible to find online

echarts-bot[bot] commented 3 years ago

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 that it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so.

A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

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! 🍵

plainheart commented 3 years ago

A very simple usage,

Before v4.0, we usually use like this,

lineStyle: {
  normal: {
     ...
  },
  emphasis: {
     ...
  }
}

Now it's suggested to configure like this,

// normal state
lineStyle: {
  ...
},
emphasis: {
  lineStyle: {
    ...
  }
}
zhoufanglu commented 3 years ago

A very simple usage,

Before v4.0, we usually use like this,

lineStyle: {
  normal: {
     ...
  },
  emphasis: {
     ...
  }
}

Now it's suggested to configure like this,

// normal state
lineStyle: {
  ...
},
emphasis: {
  lineStyle: {
    ...
  }
}

A very simple usage,

Before v4.0, we usually use like this,

lineStyle: {
  normal: {
     ...
  },
  emphasis: {
     ...
  }
}

Now it's suggested to configure like this,

// normal state
lineStyle: {
  ...
},
emphasis: {
  lineStyle: {
    ...
  }
}

chart.resize(), The animation is gone?

pissang commented 3 years ago

@zhoufanglu Please see https://echarts.apache.org/en/api.html#echartsInstance.resize

zhoufanglu commented 3 years ago

@zhoufanglu Please see https://echarts.apache.org/en/api.html#echartsInstance.resize

Thanks for the answer, it is valid. https://echarts.apache.org/zh/theme-builder.html
官方的主题文件是否没有更新到echarts5的版本? 我引用全部警告 Is the official subject file not updated to the version of Echarts5?I quote all the warnings

pissang commented 3 years ago

@zhoufanglu 嗯,主题编辑器正在升级中

zhoufanglu commented 3 years ago

@zhoufanglu 嗯,主题编辑器正在升级中

      "itemStyle": {
        "areaColor": "#eeeeee",
        "borderColor": "#aaaaaa",
        "borderWidth": 0.5,
        "emphasis": {
          "areaColor": "rgba(63,177,227,0.25)",
          "borderColor": "#3fb1e3",
          "borderWidth": 1
        }
      },

image how to modify by this warning?

plainheart commented 3 years ago
"itemStyle": {
    "areaColor": "#eeeeee",
    "borderColor": "#aaaaaa",
    "borderWidth": 0.5
},
"emphasis": {
  "itemStyle": {
    "areaColor": "rgba(63,177,227,0.25)",
    "borderColor": "#3fb1e3",
    "borderWidth": 1
  }
}