Echarts_title_icon图标

import add2 from '@/assets/images/menu_collapse.png'

title: {
      text: window.i18n.t('components.RevenueChart.455821-0') + `{titleIcon|}`,
      textStyle: {
        fontSize: 16,
        lineHeight: 20,
        rich: {
          titleIcon: {
            backgroundColor: {
              image: add2
              //'./data/asset/img/weather/sunny_128.png'
              //文本片段的 backgroundColor 可以指定为图片后,就可以在文本中使用图标了
            },
            height: 28, // 可以只指定图片的高度,从而图片的宽度根据图片的长宽比自动得到。
            width: 28
          }
        }
      }
    },

 

posted @ 2023-11-29 11:18  木木的奇奇  阅读(300)  评论(0)    收藏  举报