Intl support
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 41
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 16
Description
Under the hood, LayerChart uses LayerStack's format util to format dates and numbers.
We have plans to add a settings() context similar to Svelte UX to control this globally (as well as setting default props and global styling refinements).
Until settings is added, you can override the defaultLocale exported from @layerstack/utils
import { createLocaleSettings, defaultLocale } from '@layerstack/utils';
export function localizeLayerChart() {
Object.assign(
defaultLocale,
createLocaleSettings({
locale: 'es',
formats: { ... }
})
)
}
You can also format on a per-chart / component basis:
<script>
import { format } from '@layerstack/utils';
</script>
<Axis format={x => format(x, { locale: 'es' })} />
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the LayerStack format utility documentation and the exported defaultLocale/createLocaleSettings entry points shown in the issue. Read the linked settings issue and Svelte UX settings reference to define how global locale and format settings should be exposed. Done means LayerChart supports the planned global internationalization settings without requiring per-chart overrides.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, internationalization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100