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

Can we add custom drawing tool in the same way as we add custom indicators #1666

Closed
p3777dev opened this issue Aug 12, 2024 · 4 comments
Closed

Comments

@p3777dev
Copy link

p3777dev commented Aug 12, 2024

Question I want to add one more Fibonacci tool name Fibonacci extension with difference sequence of levels and the other one with the existing sequences . Is it achievable , as I can't see the custom way of adding tools in drawing tool as in custom indicators @martynasma .

Environment (if applicable)

Additional context

var toolbar = am5stock.StockToolbar.new(root, {
  container: document.getElementById("chartcontrols"),
  stockChart: stockChart,
  controls: [
    am5stock.DrawingControl.new(root, {
      stockChart: stockChart,
      toolSettings: {
        "Fibonacci": {
          sequence: [0, 3.618, 4.236],
          colors: [
            am5.color(0xff0000),
            am5.color(0x00ff00),
            am5.color(0x0000ff)
          ]
        }
      }
    })
  ]
});
@martynasma
Copy link
Collaborator

I'm afraid there's no easy way to add custom tools / different versions of same tool 🙁

@p3777dev
Copy link
Author

p3777dev commented Aug 12, 2024

If we can customize the indicators, then why not the drawing tools . Any specific reason ?

@martynasma
Copy link
Collaborator

Indicators are pretty standard stuff - one or more series based on a variation of data from main chart series.

Drawing tools are very distinctive in their behavior and functionality.

Copy link

This issue is stale because it has been open 30 days with no activity. It will be closed in 5 days unless a new comment is added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants