svelte-lightweight-charts icon indicating copy to clipboard operation
svelte-lightweight-charts copied to clipboard

Support plugins

Open trash-and-fire opened this issue 10 months ago • 11 comments

Support plugin system.

trash-and-fire avatar Aug 21 '23 21:08 trash-and-fire

The work on <CustomSeries> is almost done.

https://github.com/trash-and-fire/svelte-lightweight-charts/assets/69399722/b3e12fe0-e130-4800-9aec-a1182b744833

trash-and-fire avatar Oct 08 '23 12:10 trash-and-fire

I published [email protected] with the support of the custom series.

The example of usage you can find here

trash-and-fire avatar Oct 14 '23 10:10 trash-and-fire

I published [email protected] with the support of the series primitives.

The example of usage you can find here

trash-and-fire avatar Oct 15 '23 11:10 trash-and-fire

I'm still not sure about the final API of the new components. When implementing vertical lines, it seemed to me that we needed to add more convenience. Perhaps I will change the API in the final versions.

trash-and-fire avatar Oct 15 '23 11:10 trash-and-fire

Thanks for that, VerticalLines are exactly what I needed today.

oraoraroa12313 avatar Nov 04 '23 08:11 oraoraroa12313

The feature looks amazing but somehow this example does not work for me. It can't resolve the IReactiveSeriesPrimitive dep:

    Module '"svelte-lightweight-charts"' has no exported member 'IReactiveSeriesPrimitive'


    "lightweight-charts": "^4.1.1",
    "svelte-lightweight-charts": "^2.3.0-rc-1"

besides could new VertLine(time) not be an exported member instead to not have to duplicate?

go-dockly avatar Nov 25 '23 02:11 go-dockly

@go-dockly thanks. For some reason, a file was published without exported types. I'll publish again today when I get to the computer.

besides could new VertLine(time) not be an exported member instead to not have to duplicate?

I'm not sure I understood this phrase correctly, can you explain?

trash-and-fire avatar Nov 26 '23 11:11 trash-and-fire

Thanks for reply! I will try it once more :) and I meant the Vertline example you build is such a great feature. it could be well worth being made into it's own drop-in component. Really nice work!

go-dockly avatar Nov 26 '23 22:11 go-dockly

I published [email protected] with exported IReactiveSeriesPrimitive

trash-and-fire avatar Nov 28 '23 21:11 trash-and-fire

I took the implementation of vertical lines from the repository with plugin examples: https://github.com/tradingview/lightweight-charts/tree/master/plugin-examples.

Maybe I'll make a subsection with exports of plugin components something like:

import {VerticalLine} from 'svelte-lightweight-charts/plugins/vertical-line';

trash-and-fire avatar Nov 28 '23 21:11 trash-and-fire

super thankful for your work here, i was just about to attempt to implement it myself before checking here <3

skedzior avatar Apr 11 '24 19:04 skedzior