SBIN2010 commented on PR #32849:
URL: https://github.com/apache/superset/pull/32849#issuecomment-2768979292
> I see there's another way to do this, but it has me a bit stumped...
>
> ECharts supports a label position of "outside" that automatically handles
this. If you look at
`superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts`
you can find the block that's
>
> ```
> label: {
> show: !!showValue,
> position: isHorizontal ? 'right' : 'top',
> ...
> ```
>
> If you set it to `position: 'outside'` it works beautifully for negative
numbers, in both horizontal and vertical, without having to specify right or
top at all.
>
> BUT... it gives me a typescript error that `outside` is not an allowed
value. And I'm a little stymied by this... let me know if you think that's a
better approach, and maybe we can sort out the typing issue.
Thanks. At first I didn't notice the outside parameter in the echarts
documentation for position. I tested it with this parameter - and everything
works fine.
And I didn't get any typescript error.
Setting the show parameter is redundant in my opinion.
--
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]