【问题标题】:Echarts: Is there any way to add images to charts?Echarts:有没有办法在图表中添加图像?
【发布时间】:2021-09-20 16:29:34
【问题描述】:

我正在使用 Echarts 创建树状图。 我想将树的颜色更改为图像。 像这样。

              itemStyle: {
            color: {
              image: require("./french.png"),
            },
          },

我尝试使用 itemStyle,但它不起作用!有没有更好的办法?

【问题讨论】:

    标签: javascript html css echarts


    【解决方案1】:

    您始终可以使用图形组件。它让您可以将任何图形对象添加到具有给定坐标的图表中。

    只需查看此组件的文档即可了解如何使用它。 https://echarts.apache.org/en/option.html#graphic

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-09
      • 2023-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多