@@ -8,47 +8,155 @@ describe("mark constructors", () => {
88 const data = [ 1 , 2 , 3 ] ;
99
1010 // data + options
11- class MyArea extends Plot . Area { constructor ( data : Plot . Data , options : Plot . AreaOptions ) { super ( data , options ) ; } }
12- class MyArrow extends Plot . Arrow { constructor ( data : Plot . Data , options : Plot . ArrowOptions ) { super ( data , options ) ; } }
13- class MyBarX extends Plot . BarX { constructor ( data : Plot . Data , options : Plot . BarXOptions ) { super ( data , options ) ; } }
14- class MyBarY extends Plot . BarY { constructor ( data : Plot . Data , options : Plot . BarYOptions ) { super ( data , options ) ; } }
15- class MyCell extends Plot . Cell { constructor ( data : Plot . Data , options : Plot . CellOptions ) { super ( data , options ) ; } }
16- class MyContour extends Plot . Contour { constructor ( data : Plot . Data , options : Plot . ContourOptions ) { super ( data , options ) ; } }
17- class MyDensity extends Plot . Density { constructor ( data : Plot . Data , options : Plot . DensityOptions ) { super ( data , options ) ; } }
18- class MyDot extends Plot . Dot { constructor ( data : Plot . Data , options : Plot . DotOptions ) { super ( data , options ) ; } }
19- class MyGeo extends Plot . Geo { constructor ( data : Plot . Data , options : Plot . GeoOptions ) { super ( data , options ) ; } }
20- class MyImage extends Plot . Image { constructor ( data : Plot . Data , options : Plot . ImageOptions ) { super ( data , options ) ; } }
21- class MyLine extends Plot . Line { constructor ( data : Plot . Data , options : Plot . LineOptions ) { super ( data , options ) ; } }
22- class MyLink extends Plot . Link { constructor ( data : Plot . Data , options : Plot . LinkOptions ) { super ( data , options ) ; } }
23- class MyRaster extends Plot . Raster { constructor ( data : Plot . Data , options : Plot . RasterOptions ) { super ( data , options ) ; } }
24- class MyRect extends Plot . Rect { constructor ( data : Plot . Data , options : Plot . RectOptions ) { super ( data , options ) ; } }
25- class MyRuleX extends Plot . RuleX { constructor ( data : Plot . Data , options : Plot . RuleXOptions ) { super ( data , options ) ; } }
26- class MyRuleY extends Plot . RuleY { constructor ( data : Plot . Data , options : Plot . RuleYOptions ) { super ( data , options ) ; } }
27- class MyText extends Plot . Text { constructor ( data : Plot . Data , options : Plot . TextOptions ) { super ( data , options ) ; } }
28- class MyTickX extends Plot . TickX { constructor ( data : Plot . Data , options : Plot . TickXOptions ) { super ( data , options ) ; } }
29- class MyTickY extends Plot . TickY { constructor ( data : Plot . Data , options : Plot . TickYOptions ) { super ( data , options ) ; } }
30- class MyTip extends Plot . Tip { constructor ( data : Plot . Data , options : Plot . TipOptions ) { super ( data , options ) ; } }
31- class MyVector extends Plot . Vector { constructor ( data : Plot . Data , options : Plot . VectorOptions ) { super ( data , options ) ; } }
32- class MyWaffleX extends Plot . WaffleX { constructor ( data : Plot . Data , options : Plot . WaffleXOptions ) { super ( data , options ) ; } }
33- class MyWaffleY extends Plot . WaffleY { constructor ( data : Plot . Data , options : Plot . WaffleYOptions ) { super ( data , options ) ; } }
11+ class MyArea extends Plot . Area {
12+ constructor ( data : Plot . Data , options : Plot . AreaOptions ) {
13+ super ( data , options ) ;
14+ }
15+ }
16+ class MyArrow extends Plot . Arrow {
17+ constructor ( data : Plot . Data , options : Plot . ArrowOptions ) {
18+ super ( data , options ) ;
19+ }
20+ }
21+ class MyBarX extends Plot . BarX {
22+ constructor ( data : Plot . Data , options : Plot . BarXOptions ) {
23+ super ( data , options ) ;
24+ }
25+ }
26+ class MyBarY extends Plot . BarY {
27+ constructor ( data : Plot . Data , options : Plot . BarYOptions ) {
28+ super ( data , options ) ;
29+ }
30+ }
31+ class MyCell extends Plot . Cell {
32+ constructor ( data : Plot . Data , options : Plot . CellOptions ) {
33+ super ( data , options ) ;
34+ }
35+ }
36+ class MyContour extends Plot . Contour {
37+ constructor ( data : Plot . Data , options : Plot . ContourOptions ) {
38+ super ( data , options ) ;
39+ }
40+ }
41+ class MyDensity extends Plot . Density {
42+ constructor ( data : Plot . Data , options : Plot . DensityOptions ) {
43+ super ( data , options ) ;
44+ }
45+ }
46+ class MyDot extends Plot . Dot {
47+ constructor ( data : Plot . Data , options : Plot . DotOptions ) {
48+ super ( data , options ) ;
49+ }
50+ }
51+ class MyGeo extends Plot . Geo {
52+ constructor ( data : Plot . Data , options : Plot . GeoOptions ) {
53+ super ( data , options ) ;
54+ }
55+ }
56+ class MyImage extends Plot . Image {
57+ constructor ( data : Plot . Data , options : Plot . ImageOptions ) {
58+ super ( data , options ) ;
59+ }
60+ }
61+ class MyLine extends Plot . Line {
62+ constructor ( data : Plot . Data , options : Plot . LineOptions ) {
63+ super ( data , options ) ;
64+ }
65+ }
66+ class MyLink extends Plot . Link {
67+ constructor ( data : Plot . Data , options : Plot . LinkOptions ) {
68+ super ( data , options ) ;
69+ }
70+ }
71+ class MyRaster extends Plot . Raster {
72+ constructor ( data : Plot . Data , options : Plot . RasterOptions ) {
73+ super ( data , options ) ;
74+ }
75+ }
76+ class MyRect extends Plot . Rect {
77+ constructor ( data : Plot . Data , options : Plot . RectOptions ) {
78+ super ( data , options ) ;
79+ }
80+ }
81+ class MyRuleX extends Plot . RuleX {
82+ constructor ( data : Plot . Data , options : Plot . RuleXOptions ) {
83+ super ( data , options ) ;
84+ }
85+ }
86+ class MyRuleY extends Plot . RuleY {
87+ constructor ( data : Plot . Data , options : Plot . RuleYOptions ) {
88+ super ( data , options ) ;
89+ }
90+ }
91+ class MyText extends Plot . Text {
92+ constructor ( data : Plot . Data , options : Plot . TextOptions ) {
93+ super ( data , options ) ;
94+ }
95+ }
96+ class MyTickX extends Plot . TickX {
97+ constructor ( data : Plot . Data , options : Plot . TickXOptions ) {
98+ super ( data , options ) ;
99+ }
100+ }
101+ class MyTickY extends Plot . TickY {
102+ constructor ( data : Plot . Data , options : Plot . TickYOptions ) {
103+ super ( data , options ) ;
104+ }
105+ }
106+ class MyTip extends Plot . Tip {
107+ constructor ( data : Plot . Data , options : Plot . TipOptions ) {
108+ super ( data , options ) ;
109+ }
110+ }
111+ class MyVector extends Plot . Vector {
112+ constructor ( data : Plot . Data , options : Plot . VectorOptions ) {
113+ super ( data , options ) ;
114+ }
115+ }
116+ class MyWaffleX extends Plot . WaffleX {
117+ constructor ( data : Plot . Data , options : Plot . WaffleXOptions ) {
118+ super ( data , options ) ;
119+ }
120+ }
121+ class MyWaffleY extends Plot . WaffleY {
122+ constructor ( data : Plot . Data , options : Plot . WaffleYOptions ) {
123+ super ( data , options ) ;
124+ }
125+ }
34126
35127 // no data
36- class MyFrame extends Plot . Frame { constructor ( options : Plot . FrameOptions ) { super ( options ) ; } }
37- class MyHexgrid extends Plot . Hexgrid { constructor ( options : Plot . HexgridOptions ) { super ( options ) ; } }
128+ class MyFrame extends Plot . Frame {
129+ constructor ( options : Plot . FrameOptions ) {
130+ super ( options ) ;
131+ }
132+ }
133+ class MyHexgrid extends Plot . Hexgrid {
134+ constructor ( options : Plot . HexgridOptions ) {
135+ super ( options ) ;
136+ }
137+ }
38138
39139 it ( "Area" , ( ) => Plot . plot ( { marks : [ new MyArea ( data , { x1 : Plot . identity , y1 : Plot . identity } ) ] } ) ) ;
40- it ( "Arrow" , ( ) => Plot . plot ( { marks : [ new MyArrow ( data , { x1 : Plot . identity , y1 : Plot . identity , x2 : Plot . identity , y2 : Plot . identity } ) ] } ) ) ;
140+ it ( "Arrow" , ( ) =>
141+ Plot . plot ( {
142+ marks : [ new MyArrow ( data , { x1 : Plot . identity , y1 : Plot . identity , x2 : Plot . identity , y2 : Plot . identity } ) ]
143+ } ) ) ;
41144 it ( "BarX" , ( ) => Plot . plot ( { marks : [ new MyBarX ( data , { x1 : 0 , x2 : Plot . identity , y : Plot . identity } ) ] } ) ) ;
42145 it ( "BarY" , ( ) => Plot . plot ( { marks : [ new MyBarY ( data , { y1 : 0 , y2 : Plot . identity , x : Plot . identity } ) ] } ) ) ;
43146 it ( "Cell" , ( ) => Plot . plot ( { marks : [ new MyCell ( data , { x : Plot . identity } ) ] } ) ) ;
44- it ( "Contour" , ( ) => Plot . plot ( { marks : [ new MyContour ( data , { x : Plot . identity , y : Plot . identity , fill : Plot . identity } ) ] } ) ) ;
147+ it ( "Contour" , ( ) =>
148+ Plot . plot ( { marks : [ new MyContour ( data , { x : Plot . identity , y : Plot . identity , fill : Plot . identity } ) ] } ) ) ;
45149 it ( "Density" , ( ) => Plot . plot ( { marks : [ new MyDensity ( data , { x : Plot . identity , y : Plot . identity } ) ] } ) ) ;
46150 it ( "Dot" , ( ) => Plot . plot ( { marks : [ new MyDot ( data , { x : Plot . identity } ) ] } ) ) ;
47151 it ( "Geo" , ( ) => Plot . plot ( { marks : [ new MyGeo ( [ { type : "Point" , coordinates : [ 0 , 0 ] } ] , { geometry : Plot . identity } ) ] } ) ) ;
48152 it ( "Image" , ( ) => Plot . plot ( { marks : [ new MyImage ( data , { x : Plot . identity , y : Plot . identity , src : "test.png" } ) ] } ) ) ;
49153 it ( "Line" , ( ) => Plot . plot ( { marks : [ new MyLine ( data , { x : Plot . identity , y : Plot . identity } ) ] } ) ) ;
50- it ( "Link" , ( ) => Plot . plot ( { marks : [ new MyLink ( data , { x1 : Plot . identity , y1 : Plot . identity , x2 : Plot . identity , y2 : Plot . identity } ) ] } ) ) ;
51- it ( "Raster" , ( ) => Plot . plot ( { marks : [ new MyRaster ( data , { x : Plot . identity , y : Plot . identity , fill : Plot . identity } ) ] } ) ) ;
154+ it ( "Link" , ( ) =>
155+ Plot . plot ( {
156+ marks : [ new MyLink ( data , { x1 : Plot . identity , y1 : Plot . identity , x2 : Plot . identity , y2 : Plot . identity } ) ]
157+ } ) ) ;
158+ it ( "Raster" , ( ) =>
159+ Plot . plot ( { marks : [ new MyRaster ( data , { x : Plot . identity , y : Plot . identity , fill : Plot . identity } ) ] } ) ) ;
52160 it ( "Rect" , ( ) => Plot . plot ( { marks : [ new MyRect ( data , { x1 : Plot . identity , x2 : Plot . identity } ) ] } ) ) ;
53161 it ( "RuleX" , ( ) => Plot . plot ( { marks : [ new MyRuleX ( data , { x : Plot . identity } ) ] } ) ) ;
54162 it ( "RuleY" , ( ) => Plot . plot ( { marks : [ new MyRuleY ( data , { y : Plot . identity } ) ] } ) ) ;
0 commit comments