vvplot 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,9 +4,11 @@
4
4
 
5
5
  ## Usage
6
6
 
7
+ ### ES Module (Vue SFC)
8
+
7
9
  ```vue
8
10
  <template>
9
- <VVPlot :data="data">
11
+ <VVPlot :data="data" :width="600" :height="400">
10
12
  <VVGeomPoint :x="d => d.x" :y="d => d.y" />
11
13
  </VVPlot>
12
14
  </template>
@@ -18,6 +20,37 @@ const data = [{ x: 1, y: 2 }, { x: 2, y: 3 }, { x: 3, y: 5 }]
18
20
  </script>
19
21
  ```
20
22
 
23
+ ### CDN
24
+
25
+ ```html
26
+ <html>
27
+ <head>
28
+ <link rel="stylesheet" href="https://unpkg.com/vvplot@latest/dist/style.css">
29
+ </head>
30
+ <body>
31
+ <div id="plot"></div>
32
+ <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
33
+ <script src="https://unpkg.com/vvplot@latest/dist/vvplot.global.js"></script>
34
+ <script>
35
+ const { createApp, ref } = Vue
36
+ const { components } = VVPlot
37
+ const data = [{ x: 1, y: 2 }, { x: 2, y: 3 }, { x: 3, y: 5 }]
38
+ let template = `<VVPlot :data="data" :width="600" :height="400">
39
+ <VVGeomPoint :x="d => d.x" :y="d => d.y" />
40
+ </VVPlot>`
41
+ let app = createApp({
42
+ setup() { return { data } },
43
+ template
44
+ })
45
+ for (let c in components) {
46
+ app.component(c, components[c])
47
+ }
48
+ app.mount('#plot')
49
+ </script>
50
+ </body>
51
+ </html>
52
+ ```
53
+
21
54
  ## Development
22
55
 
23
56
  `node` and `npm` are required for development.
package/dist/vvplot.d.ts CHANGED
@@ -21,9 +21,12 @@ export declare namespace components {
21
21
  VVGeomBoxplot,
22
22
  VVGeomCurve,
23
23
  VVGeomDensity,
24
+ VVGeomEllipse,
24
25
  VVGeomHistogram,
25
26
  VVGeomLine,
26
27
  VVGeomLinerange,
28
+ VVGeomMarkdown,
29
+ VVGeomMarkdownsegment,
27
30
  VVGeomPath,
28
31
  VVGeomPoint,
29
32
  VVGeomPolygon,
@@ -48,7 +51,7 @@ export declare namespace number_cut {
48
51
  Z: number;
49
52
  Y: number;
50
53
  };
51
- { _default as default };
54
+ export { _default as default };
52
55
  let si: {
53
56
  y: number;
54
57
  z: number;
@@ -94,13 +97,13 @@ export declare namespace number_cut {
94
97
  }
95
98
 
96
99
  export declare namespace oob {
97
- { oob_censor as censor };
100
+ export { oob_censor as censor };
98
101
  export function squish(value: any, { min, max }: {
99
102
  min: any;
100
103
  max: any;
101
104
  }): any;
102
- { oob_squish_any as squish_any };
103
- { oob_squish_infinite as squish_infinite };
105
+ export { oob_squish_any as squish_any };
106
+ export { oob_squish_infinite as squish_infinite };
104
107
  export function discard(value: any, { min, max }: {
105
108
  min: any;
106
109
  max: any;
@@ -129,8 +132,8 @@ export declare const VVAxisX: DefineComponent_2< {}, {}, {}, {}, {}, Componen
129
132
  export declare const VVAxisY: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
130
133
 
131
134
  export declare namespace vvbreak {
132
- { break_number as number };
133
- { break_datetime as datetime };
135
+ export { break_number as number };
136
+ export { break_datetime as datetime };
134
137
  }
135
138
 
136
139
  export declare const VVGeom: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
@@ -145,12 +148,18 @@ export declare const VVGeomCurve: DefineComponent_2< {}, {}, {}, {}, {}, Comp
145
148
 
146
149
  export declare const VVGeomDensity: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
147
150
 
151
+ export declare const VVGeomEllipse: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
152
+
148
153
  export declare const VVGeomHistogram: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
149
154
 
150
155
  export declare const VVGeomLine: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
151
156
 
152
157
  export declare const VVGeomLinerange: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
153
158
 
159
+ export declare const VVGeomMarkdown: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
160
+
161
+ export declare const VVGeomMarkdownsegment: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
162
+
154
163
  export declare const VVGeomPath: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
155
164
 
156
165
  export declare const VVGeomPoint: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
@@ -170,13 +179,13 @@ export declare const VVGeomTextsegment: DefineComponent_2< {}, {}, {}, {}, {}
170
179
  export declare const VVGeomTile: DefineComponent_2< {}, {}, {}, {}, {}, ComponentOptionsMixin_2, ComponentOptionsMixin_2, {}, string, PublicProps_2, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions_2, true, {}, any>;
171
180
 
172
181
  export declare namespace vvlabel {
173
- { format_number as number };
174
- { format_datetime as datetime };
175
- { format_datetime as timestamp };
176
- { format_asis as asis };
177
- { format_auto as auto };
182
+ export { format_number as number };
183
+ export { format_datetime as datetime };
184
+ export { format_datetime as timestamp };
185
+ export { format_asis as asis };
186
+ export { format_auto as auto };
178
187
  export function _default_1(opts: any): (x: any, i: any, arr?: any[]) => string;
179
- { _default_1 as default };
188
+ export { _default_1 as default };
180
189
  }
181
190
 
182
191
  export declare const VVPlot: DefineComponent< {}, {
@@ -226,82 +235,82 @@ readonly extend?: Record<string, any> | undefined;
226
235
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, any, any>;
227
236
 
228
237
  export declare namespace vvscale {
229
- { palette_scales as color };
230
- { palette_scales as stroke };
231
- { palette_scales as fill };
238
+ export { palette_scales as color };
239
+ export { palette_scales as stroke };
240
+ export { palette_scales as fill };
232
241
  export namespace alpha {
233
- { continuous_scale as continuous };
234
- { custom_scale as custom };
242
+ export { continuous_scale as continuous };
243
+ export { custom_scale as custom };
235
244
  export function _default({ title, ...etc }?: {}): ((arr: any) => any) & {
236
245
  title: any;
237
246
  limits: any;
238
247
  oob: typeof oob_censor;
239
248
  };
240
- { _default as default };
249
+ export { _default as default };
241
250
  }
242
251
  export namespace size {
243
252
  export function identity({ title, ...etc }?: {}): ((arr: any) => any) & {
244
253
  asis: boolean;
245
254
  title: any;
246
255
  };
247
- { continuous_scale as continuous };
248
- { custom_scale as custom };
256
+ export { continuous_scale as continuous };
257
+ export { custom_scale as custom };
249
258
  export function _default_1({ title, ...etc }?: {}): ((arr: any) => any) & {
250
259
  title: any;
251
260
  limits: any;
252
261
  oob: typeof oob_censor;
253
262
  };
254
- { _default_1 as default };
263
+ export { _default_1 as default };
255
264
  }
256
265
  export namespace linewidth {
257
266
  export function identity_1({ title, ...etc }?: {}): ((arr: any) => any) & {
258
267
  asis: boolean;
259
268
  title: any;
260
269
  };
261
- { identity_1 as identity };
262
- { continuous_scale as continuous };
263
- { manual_scale as manual };
264
- { custom_scale as custom };
270
+ export { identity_1 as identity };
271
+ export { continuous_scale as continuous };
272
+ export { manual_scale as manual };
273
+ export { custom_scale as custom };
265
274
  export function _default_2({ title, ...etc }?: {}): ((arr: any) => any) & {
266
275
  title: any;
267
276
  limits: any;
268
277
  oob: typeof oob_censor;
269
278
  };
270
- { _default_2 as default };
279
+ export { _default_2 as default };
271
280
  }
272
281
  export namespace linetype {
273
282
  export function identity_2({ title, ...etc }?: {}): ((arr: any) => any) & {
274
283
  asis: boolean;
275
284
  title: any;
276
285
  };
277
- { identity_2 as identity };
278
- { linetype_scale_discrete as discrete };
279
- { linetype_scale_discrete as default };
280
- { custom_scale as custom };
286
+ export { identity_2 as identity };
287
+ export { linetype_scale_discrete as discrete };
288
+ export { linetype_scale_discrete as default };
289
+ export { custom_scale as custom };
281
290
  }
282
291
  export namespace shape {
283
292
  export function identity_3({ title, ...etc }?: {}): ((arr: any) => any) & {
284
293
  asis: boolean;
285
294
  title: any;
286
295
  };
287
- { identity_3 as identity };
288
- { shape_scale_discrete as discrete };
289
- { shape_scale_discrete as default };
290
- { custom_scale as custom };
296
+ export { identity_3 as identity };
297
+ export { shape_scale_discrete as discrete };
298
+ export { shape_scale_discrete as default };
299
+ export { custom_scale as custom };
291
300
  }
292
301
  }
293
302
 
294
303
  export declare const VVSelection: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
295
304
 
296
305
  export declare namespace vvtheme {
297
- { theme_base as base };
298
- { theme_default as default };
299
- { theme_light as light };
300
- { theme_classic as classic };
301
- { theme_gray as gray };
302
- { theme_dark as dark };
303
- { theme_linedraw as linedraw };
304
- { theme_void as void };
306
+ export { theme_base as base };
307
+ export { theme_default as default };
308
+ export { theme_light as light };
309
+ export { theme_classic as classic };
310
+ export { theme_gray as gray };
311
+ export { theme_dark as dark };
312
+ export { theme_linedraw as linedraw };
313
+ export { theme_void as void };
305
314
  }
306
315
 
307
316
  export { }