Skip to content

Commit 0590a37

Browse files
authored
rebuild 11-20 (#149)
1 parent a856df4 commit 0590a37

13 files changed

+402
-150
lines changed
262 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.
264 Bytes
Binary file not shown.

docs/assets/examples/json/features/2.4.inline-csv-data.idoc.json

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,48 @@
11
{
22
"$schema": "https://microsoft.github.io/chartifact/schema/idoc_v1.json",
33
"title": "Feature: Inline Delimited Data",
4+
"dataLoaders": [
5+
{
6+
"dataSourceName": "officeSupplies",
7+
"type": "inline",
8+
"format": "csv",
9+
"content": [
10+
"item,price",
11+
"Stapler,12.99",
12+
"Pen,1.25",
13+
"Lamp,29.99"
14+
]
15+
},
16+
{
17+
"dataSourceName": "people",
18+
"type": "inline",
19+
"format": "tsv",
20+
"content": [
21+
"name\tage\tcity",
22+
"Alice\t30\tNew York",
23+
"Bob\t25\tLos Angeles",
24+
"Charlie\t35\tChicago"
25+
]
26+
},
27+
{
28+
"dataSourceName": "products",
29+
"type": "inline",
30+
"format": "dsv",
31+
"delimiter": "|",
32+
"content": [
33+
"product|category|rating",
34+
"Laptop|Electronics|4.5",
35+
"Chair|Furniture|4.2",
36+
"Book|Education|4.8"
37+
]
38+
}
39+
],
440
"groups": [
541
{
642
"groupId": "inline_csv",
743
"elements": [
844
"## Inline CSV Data",
945
"You can provide CSV data directly as a code block within the document using the **csv plugin** with a `variableId` parameter. This is useful for small datasets or when you want to include sample data without external dependencies.",
10-
"",
11-
"```csv officeSupplies\nitem,price\nStapler,12.99\nPen,1.25\nLamp,29.99\n```",
1246
{
1347
"type": "tabulator",
1448
"dataSourceName": "officeSupplies",
@@ -25,8 +59,6 @@
2559
"elements": [
2660
"## Inline TSV Data",
2761
"You can also use tab-separated values (TSV) with the **tsv plugin** and a `variableId` parameter:",
28-
"",
29-
"```tsv people\nname\tage\tcity\nAlice\t30\tNew York\nBob\t25\tLos Angeles\nCharlie\t35\tChicago\n```",
3062
{
3163
"type": "tabulator",
3264
"dataSourceName": "people",
@@ -43,8 +75,6 @@
4375
"elements": [
4476
"## Inline DSV Data (Custom Delimiter)",
4577
"For custom delimiters, use the **dsv plugin** with `delimiter:` and `variableId:` parameters. Here's an example with pipe-separated values:",
46-
"",
47-
"```dsv delimiter:| variableId:products\nproduct|category|rating\nLaptop|Electronics|4.5\nChair|Furniture|4.2\nBook|Education|4.8\n```",
4878
{
4979
"type": "tabulator",
5080
"dataSourceName": "products",
Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
## Inline CSV Data
22
You can provide CSV data directly as a code block within the document using the **csv plugin** with a `variableId` parameter. This is useful for small datasets or when you want to include sample data without external dependencies.
33

4-
```csv officeSupplies
5-
item,price
6-
Stapler,12.99
7-
Pen,1.25
8-
Lamp,29.99
9-
```
10-
114

125
```json tabulator
136
{
@@ -24,13 +17,6 @@ Lamp,29.99
2417
## Inline TSV Data
2518
You can also use tab-separated values (TSV) with the **tsv plugin** and a `variableId` parameter:
2619

27-
```tsv people
28-
name age city
29-
Alice 30 New York
30-
Bob 25 Los Angeles
31-
Charlie 35 Chicago
32-
```
33-
3420

3521
```json tabulator
3622
{
@@ -47,13 +33,6 @@ Charlie 35 Chicago
4733
## Inline DSV Data (Custom Delimiter)
4834
For custom delimiters, use the **dsv plugin** with `delimiter:` and `variableId:` parameters. Here's an example with pipe-separated values:
4935

50-
```dsv delimiter:| variableId:products
51-
product|category|rating
52-
Laptop|Electronics|4.5
53-
Chair|Furniture|4.2
54-
Book|Education|4.8
55-
```
56-
5736

5837
```json tabulator
5938
{
@@ -64,4 +43,28 @@ Book|Education|4.8
6443
"maxHeight": "150px"
6544
}
6645
}
46+
```
47+
48+
49+
```csv officeSupplies
50+
item,price
51+
Stapler,12.99
52+
Pen,1.25
53+
Lamp,29.99
54+
```
55+
56+
57+
```tsv people
58+
name age city
59+
Alice 30 New York
60+
Bob 25 Los Angeles
61+
Charlie 35 Chicago
62+
```
63+
64+
65+
```dsv delimiter:| variableId:products
66+
product|category|rating
67+
Laptop|Electronics|4.5
68+
Chair|Furniture|4.2
69+
Book|Education|4.8
6770
```
Binary file not shown.

docs/dist/v1/chartifact.compiler.umd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
509509
return errors;
510510
}
511511
const illegalChars = "/|\\'\"`,.;:~-=+?!@#$%^&*()[]{}<>";
512-
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "origins"];
512+
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "value"];
513513
function validateRequiredString(value, propertyName, elementType) {
514514
const errors = [];
515515
if (!value) {

docs/dist/v1/chartifact.editor.umd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
493493
return errors;
494494
}
495495
const illegalChars = "/|\\'\"`,.;:~-=+?!@#$%^&*()[]{}<>";
496-
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "origins"];
496+
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "value"];
497497
function validateRequiredString(value, propertyName, elementType) {
498498
const errors = [];
499499
if (!value) {

docs/dist/v1/chartifact.host.umd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
493493
return errors;
494494
}
495495
const illegalChars = "/|\\'\"`,.;:~-=+?!@#$%^&*()[]{}<>";
496-
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "origins"];
496+
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "value"];
497497
function validateRequiredString(value, propertyName, elementType) {
498498
const errors = [];
499499
if (!value) {

0 commit comments

Comments
 (0)