Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/assets/chartifact-examples-json.zip
Binary file not shown.
Binary file modified docs/assets/chartifact-examples-markdown.zip
Binary file not shown.
Binary file modified docs/assets/chartifact-examples.zip
Binary file not shown.
42 changes: 36 additions & 6 deletions docs/assets/examples/json/features/2.4.inline-csv-data.idoc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,48 @@
{
"$schema": "https://microsoft.github.io/chartifact/schema/idoc_v1.json",
"title": "Feature: Inline Delimited Data",
"dataLoaders": [
{
"dataSourceName": "officeSupplies",
"type": "inline",
"format": "csv",
"content": [
"item,price",
"Stapler,12.99",
"Pen,1.25",
"Lamp,29.99"
]
},
{
"dataSourceName": "people",
"type": "inline",
"format": "tsv",
"content": [
"name\tage\tcity",
"Alice\t30\tNew York",
"Bob\t25\tLos Angeles",
"Charlie\t35\tChicago"
]
},
{
"dataSourceName": "products",
"type": "inline",
"format": "dsv",
"delimiter": "|",
"content": [
"product|category|rating",
"Laptop|Electronics|4.5",
"Chair|Furniture|4.2",
"Book|Education|4.8"
]
}
],
"groups": [
{
"groupId": "inline_csv",
"elements": [
"## Inline CSV Data",
"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.",
"",
"```csv officeSupplies\nitem,price\nStapler,12.99\nPen,1.25\nLamp,29.99\n```",
{
"type": "tabulator",
"dataSourceName": "officeSupplies",
Expand All @@ -25,8 +59,6 @@
"elements": [
"## Inline TSV Data",
"You can also use tab-separated values (TSV) with the **tsv plugin** and a `variableId` parameter:",
"",
"```tsv people\nname\tage\tcity\nAlice\t30\tNew York\nBob\t25\tLos Angeles\nCharlie\t35\tChicago\n```",
{
"type": "tabulator",
"dataSourceName": "people",
Expand All @@ -43,8 +75,6 @@
"elements": [
"## Inline DSV Data (Custom Delimiter)",
"For custom delimiters, use the **dsv plugin** with `delimiter:` and `variableId:` parameters. Here's an example with pipe-separated values:",
"",
"```dsv delimiter:| variableId:products\nproduct|category|rating\nLaptop|Electronics|4.5\nChair|Furniture|4.2\nBook|Education|4.8\n```",
{
"type": "tabulator",
"dataSourceName": "products",
Expand Down
45 changes: 24 additions & 21 deletions docs/assets/examples/markdown/features/2.4.inline-csv-data.idoc.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
## Inline CSV Data
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.

```csv officeSupplies
item,price
Stapler,12.99
Pen,1.25
Lamp,29.99
```


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

```tsv people
name age city
Alice 30 New York
Bob 25 Los Angeles
Charlie 35 Chicago
```


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

```dsv delimiter:| variableId:products
product|category|rating
Laptop|Electronics|4.5
Chair|Furniture|4.2
Book|Education|4.8
```


```json tabulator
{
Expand All @@ -64,4 +43,28 @@ Book|Education|4.8
"maxHeight": "150px"
}
}
```


```csv officeSupplies
item,price
Stapler,12.99
Pen,1.25
Lamp,29.99
```


```tsv people
name age city
Alice 30 New York
Bob 25 Los Angeles
Charlie 35 Chicago
```


```dsv delimiter:| variableId:products
product|category|rating
Laptop|Electronics|4.5
Chair|Furniture|4.2
Book|Education|4.8
```
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/dist/v1/chartifact.compiler.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
return errors;
}
const illegalChars = "/|\\'\"`,.;:~-=+?!@#$%^&*()[]{}<>";
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "origins"];
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "value"];
function validateRequiredString(value, propertyName, elementType) {
const errors = [];
if (!value) {
Expand Down
2 changes: 1 addition & 1 deletion docs/dist/v1/chartifact.editor.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
return errors;
}
const illegalChars = "/|\\'\"`,.;:~-=+?!@#$%^&*()[]{}<>";
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "origins"];
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "value"];
function validateRequiredString(value, propertyName, elementType) {
const errors = [];
if (!value) {
Expand Down
2 changes: 1 addition & 1 deletion docs/dist/v1/chartifact.host.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
return errors;
}
const illegalChars = "/|\\'\"`,.;:~-=+?!@#$%^&*()[]{}<>";
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "origins"];
const ignoredSignals = ["width", "height", "padding", "autosize", "background", "style", "parent", "datum", "item", "event", "cursor", "value"];
function validateRequiredString(value, propertyName, elementType) {
const errors = [];
if (!value) {
Expand Down
Loading