Skip to content

Custom scales  #55

@flekschas-ozette

Description

@flekschas-ozette

I'm wondering what the easiest way might be to implement custom scales for CandyGraph. From the top of my head, I would think to just implement a custom class that extends from Scale but if I'm not mistaken, the Scale class isn't exported by CandyGraph.

I also wonder how to support tick marks for custom scales as it looks like OrthoAxis holds the implementation for ticks. Could it make sense to have the scale class implement a function called ticks() that receives as input { resolvedTickStep, resolvedAxisLow, resolvedAxisHigh, tickOrigin } and returns an array of tick values? That way, the user wouldn't have to also implement a custom OrthoAxis class. (I assume a similar function would be needed for minorTicks)

Thanks for your help!

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