File tree Expand file tree Collapse file tree 5 files changed +108
-162
lines changed Expand file tree Collapse file tree 5 files changed +108
-162
lines changed Original file line number Diff line number Diff line change 1717 "scripts" : {
1818 "build" : " rollup -c" ,
1919 "dev" : " karma start --auto-watch --no-single-run --browsers chrome --grep" ,
20- "lint" : " eslint samples/**/*.html src/**/*.js" ,
20+ "lint" : " eslint samples/**/*.html test/**/*.js src/**/*.js" ,
2121 "test" : " concurrently \" npm:test-*\" " ,
2222 "test-types" : " tsc -p types/test/" ,
2323 "test-lint" : " npm run lint" ,
2424 "test-karma" : " karma start --auto-watch --single-run --coverage --grep"
2525 },
2626 "devDependencies" : {
27- "@rollup/plugin-commonjs" : " ^17.0.0" ,
2827 "@rollup/plugin-node-resolve" : " ^11.0.1" ,
2928 "chart.js" : " ^3.0.0-beta.7" ,
3029 "chartjs-test-utils" : " ^0.1.1" ,
Original file line number Diff line number Diff line change 11module . exports = {
2- config : {
3- type : 'scatter' ,
4- options : {
5- scales : {
6- x : {
7- display : false ,
8- min : 0 ,
9- max : 100
10- } ,
11- y : {
12- display : false ,
13- min : 0 ,
14- max : 100
15- }
16- } ,
17- plugins : {
18- annotation : {
19- annotations : {
20- left : {
21- type : 'line' ,
22- scaleID : 'y' ,
23- value : 25 ,
24- borderColor : 'black' ,
25- borderWidth : 5 ,
26- label : {
27- position : 'left' ,
28- backgroundColor : 'black' ,
29- content : 'left' ,
30- enabled : true
31- } ,
32- } ,
33- hCenter : {
34- type : 'line' ,
35- scaleID : 'y' ,
36- value : 50 ,
37- borderColor : 'black' ,
38- borderWidth : 5 ,
39- label : {
40- position : 'center' ,
41- backgroundColor : 'black' ,
42- content : 'center' ,
43- enabled : true
44- } ,
45- } ,
46- right : {
47- type : 'line' ,
48- scaleID : 'y' ,
49- value : 75 ,
50- borderColor : 'black' ,
51- borderWidth : 5 ,
52- label : {
53- position : 'right' ,
54- backgroundColor : 'black' ,
55- content : 'right' ,
56- enabled : true
57- } ,
58- } ,
59- top : {
60- type : 'line' ,
61- scaleID : 'x' ,
62- value : 15 ,
63- borderColor : 'red' ,
64- borderWidth : 5 ,
65- label : {
66- position : 'top' ,
67- backgroundColor : 'red' ,
68- content : 'top' ,
69- enabled : true
70- }
71- } ,
72- vCenter : {
73- type : 'line' ,
74- scaleID : 'x' ,
75- value : 25 ,
76- borderColor : 'red' ,
77- borderWidth : 5 ,
78- label : {
79- position : 'center' ,
80- backgroundColor : 'red' ,
81- content : 'center' ,
82- enabled : true
83- }
84- } ,
85- bottom : {
86- type : 'line' ,
87- scaleID : 'x' ,
88- value : 35 ,
89- borderColor : 'red' ,
90- borderWidth : 5 ,
91- label : {
92- position : 'bottom' ,
93- backgroundColor : 'red' ,
94- content : 'bottom' ,
95- enabled : true
96- }
97- }
98- }
99- }
100- }
101- }
102- } ,
103- options : {
104- spriteText : true
105- }
2+ config : {
3+ type : 'scatter' ,
4+ options : {
5+ scales : {
6+ x : {
7+ display : false ,
8+ min : 0 ,
9+ max : 100
10+ } ,
11+ y : {
12+ display : false ,
13+ min : 0 ,
14+ max : 100
15+ }
16+ } ,
17+ plugins : {
18+ annotation : {
19+ annotations : {
20+ left : {
21+ type : 'line' ,
22+ scaleID : 'y' ,
23+ value : 25 ,
24+ borderColor : 'black' ,
25+ borderWidth : 5 ,
26+ label : {
27+ position : 'left' ,
28+ backgroundColor : 'black' ,
29+ content : 'left' ,
30+ enabled : true
31+ } ,
32+ } ,
33+ hCenter : {
34+ type : 'line' ,
35+ scaleID : 'y' ,
36+ value : 50 ,
37+ borderColor : 'black' ,
38+ borderWidth : 5 ,
39+ label : {
40+ position : 'center' ,
41+ backgroundColor : 'black' ,
42+ content : 'center' ,
43+ enabled : true
44+ } ,
45+ } ,
46+ right : {
47+ type : 'line' ,
48+ scaleID : 'y' ,
49+ value : 75 ,
50+ borderColor : 'black' ,
51+ borderWidth : 5 ,
52+ label : {
53+ position : 'right' ,
54+ backgroundColor : 'black' ,
55+ content : 'right' ,
56+ enabled : true
57+ } ,
58+ } ,
59+ top : {
60+ type : 'line' ,
61+ scaleID : 'x' ,
62+ value : 15 ,
63+ borderColor : 'red' ,
64+ borderWidth : 5 ,
65+ label : {
66+ position : 'top' ,
67+ backgroundColor : 'red' ,
68+ content : 'top' ,
69+ enabled : true
70+ }
71+ } ,
72+ vCenter : {
73+ type : 'line' ,
74+ scaleID : 'x' ,
75+ value : 25 ,
76+ borderColor : 'red' ,
77+ borderWidth : 5 ,
78+ label : {
79+ position : 'center' ,
80+ backgroundColor : 'red' ,
81+ content : 'center' ,
82+ enabled : true
83+ }
84+ } ,
85+ bottom : {
86+ type : 'line' ,
87+ scaleID : 'x' ,
88+ value : 35 ,
89+ borderColor : 'red' ,
90+ borderWidth : 5 ,
91+ label : {
92+ position : 'bottom' ,
93+ backgroundColor : 'red' ,
94+ content : 'bottom' ,
95+ enabled : true
96+ }
97+ }
98+ }
99+ }
100+ }
101+ }
102+ } ,
103+ options : {
104+ spriteText : true
105+ }
106106} ;
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ window.devicePixelRatio = 1;
44jasmine . fixtures = specsFromFixtures ;
55
66beforeEach ( function ( ) {
7- addMatchers ( ) ;
7+ addMatchers ( ) ;
88} ) ;
99
1010afterEach ( function ( ) {
11- releaseCharts ( ) ;
11+ releaseCharts ( ) ;
1212} ) ;
Original file line number Diff line number Diff line change 11describe ( 'Line annotation' , function ( ) {
2- describe ( 'auto' , jasmine . fixtures ( 'line' ) ) ;
2+ describe ( 'auto' , jasmine . fixtures ( 'line' ) ) ;
33} ) ;
You can’t perform that action at this time.
0 commit comments