-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdata-labels.ts
More file actions
40 lines (38 loc) · 1.3 KB
/
data-labels.ts
File metadata and controls
40 lines (38 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import type {ChartData, ScatterSeries} from '../../../types';
function prepareData(): ChartData {
return {
series: {
data: [
{
type: 'scatter',
name: 'Series 1',
data: [
{x: 1, y: 10, label: 'A (10)'},
{x: 2, y: 40, label: 'B (40)'},
{x: 3, y: 25, label: 'C (25)'},
{x: 4, y: 60, label: 'D (60)'},
{x: 5, y: 15, label: 'E (15)'},
],
dataLabels: {
enabled: true,
},
},
{
type: 'scatter',
name: 'Series 2',
data: [
{x: 1, y: 50, label: 'F (50)'},
{x: 2, y: 20, label: 'G (20)'},
{x: 3, y: 70, label: 'H (70)'},
{x: 4, y: 35, label: 'I (35)'},
{x: 5, y: 55, label: 'J (55)'},
],
dataLabels: {
enabled: true,
},
},
] as ScatterSeries[],
},
};
}
export const scatterDataLabelsData = prepareData();