Skip to content

Allow passing defaults to marks via svelteplot/defaults #66

@gka

Description

@gka

Is your feature request related to a problem? Please describe.

see #59

Describe the solution you'd like

we want to be able to provide defaults on a mark level via the svelteplot/defaults context:

setContext('svelteplot/defaults', {
  line: {
    strokeWidth: 2
  },
  dot: {
    r: 4
  },
  graticule: {
    step: 10
  }
});

Some considerations:

  • The props would be itentical to the prop names exposed by the marks
  • We can re-use the typings exported by the Mark components
  • We should limit this to styling options and probably prevent users from setting defaults for positional channels like x, x1, y, or data etc

Please all note that this is a breaking change as we're going to rename some of the existing keys in svelteplot/defaults!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy