Skip to content

CandleChart feature request #852

@l0uisgrange

Description

@l0uisgrange

Hey @techniq 👋,

Seems your project is skyrocketing, congratulations!
The shadcn-svelte integration is very very clean, and I'm kind of jealous of the new LineChart very simple implementation and also your latest improvement in bundle size.
I think you may have created the best visualization library on the whole internet 😳!

I would love to have the same API for candlesticks (e.g. Candlechart, sorry to annoy you again, maybe I'm the only one needing this). I know it's a relatively big feature, so I would like to start smaller.
I tried using the candlestick example and make it work with the current shadcn-svelte charts implementation, but could not manage to make something work sadly 🥲...

Anyway, here's what I tried:

<Chart
    {data}
    ... // typical arguments
    props={{
        rule: { oc: { color: "var(--chart-1)" }, hl: { color: "var(--chart-1)" } },
        highlight: { lines: true, axis: "both" },
    }}
>
    {#snippet tooltip()}
        <ChartTooltip labelFormatter={(v, _) => dayjs(v).format('LL')} />
    {/snippet}
</Chart >

Also, I tried highlight using lines instead of points, with axis: "both" on a classic LineChart and does not seem to work (only the dot shows like below). Am I doing something wrong?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions