project-nv / night-vision

Highly customizable charting library, created for professional traders
https://nightvision.dev
MIT License
237 stars 54 forks source link

dynamically add more icone controller to Legend Controls #42

Open majid1605 opened 1 year ago

majid1605 commented 1 year ago

Description

Hi In order to have more control over the chart and make changes on t he chart dynamically, I suggest adding a possibility to add different icons to the legend. Something like Trading View. By owning any event, people can implement whatever they want

Screenshot_20230107_114025

Suggested solution

It is better for each overlays to have settings for this. For example:

overlays: [
      {
        name: "name",
        type: "Candles",
        main: true,
        settings: {},
        props: {},
        legendSettings: [
          {
            event: "handler1",
            icon: "myIcon1",
            tooltip: "tools1",
          },
          {
            event: "handler2",
            icon: "myIcon2",
            tooltip: "tools2",
          },
        ],
      },
    ]

Alternative

No response

Additional context

No response

Validations