jiawulin001 commented on issue #16843: URL: https://github.com/apache/echarts/issues/16843#issuecomment-1091659903
You can add images to title with `textStyle.rich`. Please refer to [documentation](https://echarts.apache.org/en/option.html#title.textStyle.rich) and [examples](https://echarts.apache.org/en/tutorial.html#Rich%20Text) Here's an example I made for you. <details> <summary>Code sample</summary> ``` var ROOT_PATH = 'https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples'; const Sunny = ROOT_PATH + '/data/asset/img/weather/sunny_128.png'; option = { xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, title: { text: '{a|}Sunny Day!', textStyle: { color: 'black', rich: { a: { backgroundColor: { image: Sunny }, height: 40, width: 50 } } } }, series: [ { data: [120, 200, 150, 80, 70, 110, 130], type: 'bar', showBackground: true, backgroundStyle: { color: 'rgba(180, 180, 180, 0.2)' } } ] }; ``` </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org For additional commands, e-mail: dev-h...@echarts.apache.org