Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support to chagne scatter symbol size #2125

Merged
merged 3 commits into from
Oct 19, 2024

Conversation

xzmeng
Copy link
Contributor

@xzmeng xzmeng commented Oct 17, 2024

Currently we use the echarts default symbol size (10px) when plotting scatter indicators. This PR changes the default symbol size to 3px and adds a spin button to adjust the value.

Before:
截屏2024-10-18 04 21 56
After:
截屏2024-10-18 04 22 53
截屏2024-10-18 04 23 09

Copy link
Member

@xmatthias xmatthias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed a "migration" bug (see other comment) - and simplified the code a bit (there's no need for a constant if it's only used once).

Other than that - great enhancement 💯
LGTM 👍

@@ -24,6 +24,12 @@ export function generateCandleSeries(
},
showSymbol: false,
};
if (value.type === ChartType.scatter) {
sp['symbolSize'] = value.scatterSymbolSize;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll need a fallback here.
symbolSize can't be undefined - which it is if you have an existing plot-config with scatter (checkout main, create a new plot config with a scatter plot - close the page (due to a HMR bug in pinia-persisted-state it seems)- checkout your branch and reopen the page - notice that the scatter plot doesn't render).

@xmatthias xmatthias enabled auto-merge October 19, 2024 07:46
@xmatthias xmatthias merged commit 9abfd61 into freqtrade:main Oct 19, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants