FirokOtaku commented on issue #13627:
URL: https://github.com/apache/echarts/issues/13627#issuecomment-1811768277
@praful-hunde a temporary solution: use image as `markLine` symbol
Here I'm creating a canvas element for drawing image then convert it into
`dataURL`.
Or you could convert any other image into `dataURL` too.
```javascript
// create canvas and resize it
const domCanvas = document.createElement('canvas')
domCanvas .width = 56
domCanvas .height = 24
// draw anything on it
const ctx = domCanvas .getContext('2d')
ctx.font = '24px serif'
ctx.fillStyle = 'red'
ctx.fillText('30', 0, 24)
// convert into dataURL
const dataurlImg = domCanvas.toDataURL()
window.dataurlImg = dataurlImg
```
chart option:
```json
series: [
{
...
markLine: {
symbol: ['image://' + window?.dataurlImg, null], // set label only for
one side
symbolSize: [28, 12], // scale a big picture into smaller size for
clearity
symbolRotate: [0, 0],
symbolOffset: [[0, -2], [0,0]],
...
},
```
preview:

not looks very good, but it just works for some cases (at least my case).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]