@nebula.js/sn-histogram 0.35.4 → 1.0.1

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
@@ -12,8 +12,6 @@ If you use pnpm: `pnpm install @nebula.js/sn-histogram`. You can also load throu
12
12
 
13
13
  ## Usage
14
14
 
15
- <!-- ![image info](./assets/sn-histogram-chart.png)-->
16
-
17
15
  ```js
18
16
  import { embed } from '@nebula.js/stardust';
19
17
  import histogram from '@nebula.js/sn-histogram';
@@ -43,8 +41,6 @@ embeddable.render({
43
41
 
44
42
  Set maximum number to the number of bars you want to divide the data into. Setting `binMode` property to `maxCount` and set `binCount` to the number of bars that you want the chart to display.
45
43
 
46
- <!-- ![image info](./assets/sn-histogram-chart-max-count.png)-->
47
-
48
44
  ```js
49
45
  embeddable.render({
50
46
  element,
@@ -70,8 +66,6 @@ Set width to define how wide each bar is. This is based on the values on the x-a
70
66
 
71
67
  Setting `binMode` property to `size` and set `binSize` and `offset` to desired numbers.
72
68
 
73
- <!-- ![image info](./assets/sn-histogram-chart-bar-width.png)-->
74
-
75
69
  ```js
76
70
  embeddable.render({
77
71
  element,
@@ -328,45 +328,3 @@ Visualization footnote.
328
328
  **Default**: <code>&quot;&quot;</code>
329
329
 
330
330
  # Definitions
331
- <a name="paletteColor"></a>
332
-
333
- ## paletteColor : <code>object</code>
334
- Color information structure. Holds the actual color and index in palette.
335
-
336
- **Kind**: global typedef
337
- **Properties**
338
-
339
- | Name | Type | Description |
340
- | --- | --- | --- |
341
- | color | <code>string</code> | Color as hex string (mandatory if index: -1) |
342
- | index | <code>number</code> | Index in palette |
343
-
344
- <a name="refLineStyle"></a>
345
-
346
- ## refLineStyle : <code>object</code>
347
- Styling settings for reference line
348
-
349
- **Kind**: global typedef
350
- **Properties**
351
-
352
- | Name | Type | Default | Description |
353
- | --- | --- | --- | --- |
354
- | [lineThickness] | <code>number</code> | <code>2</code> | Set the thickness for this reference line. |
355
- | [lineType] | <code>string</code> | <code>&quot;&#x27;&#x27;&quot;</code> | Set the dash type for this reference line. |
356
-
357
- <a name="refLine"></a>
358
-
359
- ## refLine : <code>object</code>
360
- **Kind**: global typedef
361
- **Properties**
362
-
363
- | Name | Type | Default | Description |
364
- | --- | --- | --- | --- |
365
- | show | <code>boolean</code> \| <code>ValueExpression</code> | <code>true</code> | Set to true to display this reference line. |
366
- | label | <code>string</code> | | Reference line label. |
367
- | [showLabel] | <code>boolean</code> | <code>true</code> | Set to true to show the label of this reference line. |
368
- | [showValue] | <code>boolean</code> | <code>true</code> | Set to true to show the value of this reference line. |
369
- | paletteColor | [<code>paletteColor</code>](#paletteColor) | | |
370
- | [style] | [<code>refLineStyle</code>](#refLineStyle) | | Styling settings for reference line |
371
- | [coloredBackground] | <code>boolean</code> | <code>false</code> | Set to true to fill the label and/or value of this reference line with this color |
372
-
@@ -1,9 +1,9 @@
1
1
  {
2
- "scriptappy": "1.0.0",
2
+ "scriptappy": "1.1.0",
3
3
  "info": {
4
4
  "name": "@nebula.js/sn-histogram:properties",
5
5
  "description": "Histogram generic object definition",
6
- "version": "0.35.4",
6
+ "version": "0.35.5",
7
7
  "license": "MIT",
8
8
  "stability": "experimental",
9
9
  "x-qlik-visibility": "private"
@@ -14,7 +14,6 @@
14
14
  "entries": {
15
15
  "bins": {
16
16
  "description": "Bin settings.",
17
- "kind": "object",
18
17
  "entries": {
19
18
  "auto": {
20
19
  "description": "Auto mode generates a nice looking histogram without special parameters.",
@@ -41,38 +40,38 @@
41
40
  "description": "Used to know where to start displaying bars on x-axis.",
42
41
  "type": "number"
43
42
  }
44
- }
43
+ },
44
+ "kind": "object"
45
45
  },
46
46
  "color": {
47
47
  "description": "Color settings.",
48
- "kind": "object",
49
48
  "entries": {
50
49
  "bar": {
51
- "kind": "object",
52
50
  "entries": {
53
51
  "paletteColor": {
54
52
  "description": "The paletteColor object is used to define the bar color.",
55
53
  "defaultValue": "{ index: 6 }",
56
54
  "type": "#/definitions/paletteColor"
57
55
  }
58
- }
56
+ },
57
+ "kind": "object"
59
58
  }
60
- }
59
+ },
60
+ "kind": "object"
61
61
  },
62
62
  "dataPoint": {
63
63
  "description": "Data points",
64
- "kind": "object",
65
64
  "entries": {
66
65
  "showLabels": {
67
66
  "description": "Show labels on bars",
68
67
  "defaultValue": false,
69
68
  "type": "boolean"
70
69
  }
71
- }
70
+ },
71
+ "kind": "object"
72
72
  },
73
73
  "dimensionAxis": {
74
74
  "description": "Dimension axis settings.",
75
- "kind": "object",
76
75
  "entries": {
77
76
  "dock": {
78
77
  "description": "Axis docking position",
@@ -87,14 +86,12 @@
87
86
  "kind": "literal",
88
87
  "value": "'far'"
89
88
  }
90
- ],
91
- "type": "string"
89
+ ]
92
90
  },
93
91
  "label": {
94
92
  "description": "Label orientation",
95
- "defaultValue": "auto",
96
- "kind": "literal",
97
- "value": "'auto'"
93
+ "value": "'auto'",
94
+ "kind": "literal"
98
95
  },
99
96
  "show": {
100
97
  "description": "Labels and title",
@@ -117,10 +114,10 @@
117
114
  "kind": "literal",
118
115
  "value": "'none'"
119
116
  }
120
- ],
121
- "type": "string"
117
+ ]
122
118
  }
123
- }
119
+ },
120
+ "kind": "object"
124
121
  },
125
122
  "footnote": {
126
123
  "description": "Visualization footnote.",
@@ -134,12 +131,10 @@
134
131
  {
135
132
  "type": "StringExpression"
136
133
  }
137
- ],
138
- "type": "any"
134
+ ]
139
135
  },
140
136
  "gridlines": {
141
137
  "description": "Grid lines settings.",
142
- "kind": "object",
143
138
  "entries": {
144
139
  "auto": {
145
140
  "description": "Automatic grid line spacing.",
@@ -163,14 +158,13 @@
163
158
  "kind": "literal",
164
159
  "value": 3
165
160
  }
166
- ],
167
- "type": "number"
161
+ ]
168
162
  }
169
- }
163
+ },
164
+ "kind": "object"
170
165
  },
171
166
  "measureAxis": {
172
167
  "description": "Measure axis settings.",
173
- "kind": "object",
174
168
  "entries": {
175
169
  "autoMinMax": {
176
170
  "description": "Automatic max/min",
@@ -190,8 +184,7 @@
190
184
  "kind": "literal",
191
185
  "value": "'far'"
192
186
  }
193
- ],
194
- "type": "string"
187
+ ]
195
188
  },
196
189
  "label": {
197
190
  "description": "Label to show on the measure axis, if left empty it defaults to 'Frequency'",
@@ -205,8 +198,7 @@
205
198
  {
206
199
  "type": "StringExpression"
207
200
  }
208
- ],
209
- "type": "any"
201
+ ]
210
202
  },
211
203
  "max": {
212
204
  "description": "Axis max value. `\"autoMinMax\"` must be set to false and `\"minMax\"`\nmust be set to `\"max\"` or `\"minMax\"` to use this property",
@@ -219,8 +211,7 @@
219
211
  {
220
212
  "type": "ValueExpression"
221
213
  }
222
- ],
223
- "type": "any"
214
+ ]
224
215
  },
225
216
  "min": {
226
217
  "description": "Axis min value. `\"autoMinMax\"` must be set to false and `\"minMax\"`\nmust be set to `\"min\"` or `\"minMax\"` to use this property",
@@ -233,8 +224,7 @@
233
224
  {
234
225
  "type": "ValueExpression"
235
226
  }
236
- ],
237
- "type": "any"
227
+ ]
238
228
  },
239
229
  "minMax": {
240
230
  "description": "Set custom max/min",
@@ -253,8 +243,7 @@
253
243
  "kind": "literal",
254
244
  "value": "'minMax'"
255
245
  }
256
- ],
257
- "type": "string"
246
+ ]
258
247
  },
259
248
  "show": {
260
249
  "description": "Labels and title",
@@ -277,15 +266,15 @@
277
266
  "kind": "literal",
278
267
  "value": "'none'"
279
268
  }
280
- ],
281
- "type": "string"
269
+ ]
282
270
  },
283
271
  "spacing": {
284
272
  "description": "Axis scale",
285
273
  "defaultValue": 1,
286
274
  "type": "number"
287
275
  }
288
- }
276
+ },
277
+ "kind": "object"
289
278
  },
290
279
  "qHyperCubeDef": {
291
280
  "description": "Extends `HyperCubeDef`, see Engine API: `HyperCubeDef`.",
@@ -294,12 +283,10 @@
294
283
  "type": "HyperCubeDef"
295
284
  }
296
285
  ],
297
- "kind": "object",
298
- "entries": {}
286
+ "kind": "object"
299
287
  },
300
288
  "refLine": {
301
289
  "description": "Reference lines settings",
302
- "kind": "object",
303
290
  "entries": {
304
291
  "refLines": {
305
292
  "description": "Array of measure based reference line definitions",
@@ -308,7 +295,8 @@
308
295
  "type": "#/definitions/refLine"
309
296
  }
310
297
  }
311
- }
298
+ },
299
+ "kind": "object"
312
300
  },
313
301
  "showTitles": {
314
302
  "description": "Show title for the visualization.",
@@ -318,15 +306,14 @@
318
306
  },
319
307
  "sorting": {
320
308
  "description": "Wrapper for sorting properties which will be set on the outer dimension.",
321
- "kind": "object",
322
309
  "entries": {
323
310
  "autoSort": {
324
311
  "description": "Sort automatically",
325
- "defaultValue": true,
326
- "kind": "literal",
327
- "value": "true"
312
+ "value": "true",
313
+ "kind": "literal"
328
314
  }
329
- }
315
+ },
316
+ "kind": "object"
330
317
  },
331
318
  "subtitle": {
332
319
  "description": "Visualization subtitle.",
@@ -340,8 +327,7 @@
340
327
  {
341
328
  "type": "StringExpression"
342
329
  }
343
- ],
344
- "type": "any"
330
+ ]
345
331
  },
346
332
  "title": {
347
333
  "description": "Visualization title.",
@@ -355,8 +341,7 @@
355
341
  {
356
342
  "type": "StringExpression"
357
343
  }
358
- ],
359
- "type": "any"
344
+ ]
360
345
  },
361
346
  "version": {
362
347
  "description": "Current version of this generic object definition.",
@@ -383,6 +368,13 @@
383
368
  "refLine": {
384
369
  "kind": "object",
385
370
  "entries": {
371
+ "label": {
372
+ "description": "Reference line label.",
373
+ "type": "string"
374
+ },
375
+ "paletteColor": {
376
+ "type": "#/definitions/paletteColor"
377
+ },
386
378
  "show": {
387
379
  "description": "Set to true to display this reference line.",
388
380
  "defaultValue": true,
@@ -394,12 +386,13 @@
394
386
  {
395
387
  "type": "ValueExpression"
396
388
  }
397
- ],
398
- "type": "any"
389
+ ]
399
390
  },
400
- "label": {
401
- "description": "Reference line label.",
402
- "type": "string"
391
+ "coloredBackground": {
392
+ "description": "Set to true to fill the label and/or value of this reference line with this color",
393
+ "optional": true,
394
+ "defaultValue": false,
395
+ "type": "boolean"
403
396
  },
404
397
  "showLabel": {
405
398
  "description": "Set to true to show the label of this reference line.",
@@ -413,19 +406,10 @@
413
406
  "defaultValue": true,
414
407
  "type": "boolean"
415
408
  },
416
- "paletteColor": {
417
- "type": "#/definitions/paletteColor"
418
- },
419
409
  "style": {
420
410
  "description": "Styling settings for reference line",
421
411
  "optional": true,
422
412
  "type": "#/definitions/refLineStyle"
423
- },
424
- "coloredBackground": {
425
- "description": "Set to true to fill the label and/or value of this reference line with this color",
426
- "optional": true,
427
- "defaultValue": false,
428
- "type": "boolean"
429
413
  }
430
414
  }
431
415
  },