trash-and-fire / svelte-lightweight-charts

Svelte wrapper for financial lightweight charts
MIT License
106 stars 13 forks source link

Support plugins #82

Open trash-and-fire opened 1 year ago

trash-and-fire commented 1 year ago

Support plugin system.

trash-and-fire commented 11 months ago

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 commented 11 months ago

I published svelte-lightweight-charts@2.3.0-rc-0 with the support of the custom series.

The example of usage you can find here

trash-and-fire commented 11 months ago

I published svelte-lightweight-charts@2.3.0-rc-1 with the support of the series primitives.

The example of usage you can find here

trash-and-fire commented 11 months ago

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.

oraoraroa12313 commented 10 months ago

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

go-dockly commented 9 months ago

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?

trash-and-fire commented 9 months ago

@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?

go-dockly commented 9 months ago

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!

trash-and-fire commented 9 months ago

I published svelte-lightweight-charts@2.3.0-rc-2 with exported IReactiveSeriesPrimitive

trash-and-fire commented 9 months ago

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';
skedzior commented 5 months ago

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