Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update radar dataset option typings #9462

Merged
merged 1 commit into from Jul 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions types/index.esm.d.ts
Expand Up @@ -377,10 +377,8 @@ export const PolarAreaController: ChartComponent & {

export interface RadarControllerDatasetOptions
extends ControllerDatasetOptions,
ScriptableOptions<PointPrefixedOptions, ScriptableContext<'radar'>>,
ScriptableOptions<PointPrefixedHoverOptions, ScriptableContext<'radar'>>,
ScriptableOptions<LineOptions, ScriptableContext<'radar'>>,
ScriptableOptions<LineHoverOptions, ScriptableContext<'radar'>>,
ScriptableAndArrayOptions<PointOptions & PointHoverOptions & PointPrefixedOptions & PointPrefixedHoverOptions, ScriptableContext<'radar'>>,
ScriptableAndArrayOptions<LineOptions & LineHoverOptions, ScriptableContext<'radar'>>,
AnimationOptions<'radar'> {
/**
* The ID of the x axis to plot this dataset on.
Expand Down
26 changes: 26 additions & 0 deletions types/tests/controllers/radar_dataset_indexable_options.ts
@@ -0,0 +1,26 @@
import { Chart, ChartOptions } from '../../index.esm';

const chart = new Chart('test', {
type: 'radar',
data: {
labels: ['a', 'b', 'c'],
datasets: [{
data: [1, 2, 3],
backgroundColor: ['red', 'green', 'blue'],
borderColor: ['red', 'green', 'blue'],
hoverRadius: [1, 2, 3],
pointBackgroundColor: ['red', 'green', 'blue'],
pointBorderColor: ['red', 'green', 'blue'],
pointBorderWidth: [1, 2, 3],
pointHitRadius: [1, 2, 3],
pointHoverBackgroundColor: ['red', 'green', 'blue'],
pointHoverBorderColor: ['red', 'green', 'blue'],
pointHoverBorderWidth: [1, 2, 3],
pointHoverRadius: [1, 2, 3],
pointRadius: [1, 2, 3],
pointRotation: [1, 2, 3],
pointStyle: ['circle', 'cross', 'crossRot'],
radius: [1, 2, 3],
}]
},
});