Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle vega "stroke" symbols to support line legends #33

Merged
merged 1 commit into from
Jan 20, 2024
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10,145 changes: 10,145 additions & 0 deletions sg2d-vega-test-data/vega-scenegraphs/line/stocks-legend.sg.json

Large diffs are not rendered by default.

Binary file modified sg2d-vega-test-data/vega-scenegraphs/line/stocks_dashed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
335 changes: 334 additions & 1 deletion sg2d-vega-test-data/vega-scenegraphs/line/stocks_dashed.sg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"width": 414,
"width": 480,
"height": 410,
"origin": [
7,
Expand Down Expand Up @@ -7066,6 +7066,339 @@
"name": "pathgroup",
"role": "scope",
"zindex": 0
},
{
"clip": false,
"interactive": false,
"items": [
{
"items": [
{
"clip": false,
"interactive": false,
"items": [
{
"items": [
{
"clip": false,
"interactive": false,
"items": [
{
"items": [
{
"clip": false,
"interactive": false,
"items": [
{
"opacity": 1,
"x": 6,
"y": 6,
"fill": "transparent",
"shape": "stroke",
"size": 100,
"stroke": "#4c78a8",
"strokeWidth": 1.5,
"strokeDash": [
2,
0
]
}
],
"marktype": "symbol",
"role": "legend-symbol",
"zindex": 0
},
{
"clip": false,
"interactive": false,
"items": [
{
"fill": "#000",
"fontSize": 10,
"opacity": 1,
"x": 16,
"y": 6,
"align": "left",
"baseline": "middle",
"font": "Helvetica",
"limit": 160,
"text": "AAPL"
}
],
"marktype": "text",
"role": "legend-label",
"zindex": 0
}
],
"width": 47.11328125,
"height": 11,
"opacity": 1,
"x": 0,
"y": 0
},
{
"items": [
{
"clip": false,
"interactive": false,
"items": [
{
"opacity": 1,
"x": 6,
"y": 6,
"fill": "transparent",
"shape": "stroke",
"size": 100,
"stroke": "#4c78a8",
"strokeWidth": 1.5,
"strokeDash": [
8,
4
]
}
],
"marktype": "symbol",
"role": "legend-symbol",
"zindex": 0
},
{
"clip": false,
"interactive": false,
"items": [
{
"fill": "#000",
"fontSize": 10,
"opacity": 1,
"x": 16,
"y": 6,
"align": "left",
"baseline": "middle",
"font": "Helvetica",
"limit": 160,
"text": "AMZN"
}
],
"marktype": "text",
"role": "legend-label",
"zindex": 0
}
],
"width": 47.11328125,
"height": 11,
"opacity": 1,
"x": 0,
"y": 13
},
{
"items": [
{
"clip": false,
"interactive": false,
"items": [
{
"opacity": 1,
"x": 6,
"y": 6,
"fill": "transparent",
"shape": "stroke",
"size": 100,
"stroke": "#4c78a8",
"strokeWidth": 1.5,
"strokeDash": [
4,
2
]
}
],
"marktype": "symbol",
"role": "legend-symbol",
"zindex": 0
},
{
"clip": false,
"interactive": false,
"items": [
{
"fill": "#000",
"fontSize": 10,
"opacity": 1,
"x": 16,
"y": 6,
"align": "left",
"baseline": "middle",
"font": "Helvetica",
"limit": 160,
"text": "GOOG"
}
],
"marktype": "text",
"role": "legend-label",
"zindex": 0
}
],
"width": 47.11328125,
"height": 11,
"opacity": 1,
"x": 0,
"y": 26
},
{
"items": [
{
"clip": false,
"interactive": false,
"items": [
{
"opacity": 1,
"x": 6,
"y": 6,
"fill": "transparent",
"shape": "stroke",
"size": 100,
"stroke": "#4c78a8",
"strokeWidth": 1.5,
"strokeDash": [
2,
2
]
}
],
"marktype": "symbol",
"role": "legend-symbol",
"zindex": 0
},
{
"clip": false,
"interactive": false,
"items": [
{
"fill": "#000",
"fontSize": 10,
"opacity": 1,
"x": 16,
"y": 6,
"align": "left",
"baseline": "middle",
"font": "Helvetica",
"limit": 160,
"text": "IBM"
}
],
"marktype": "text",
"role": "legend-label",
"zindex": 0
}
],
"width": 47.11328125,
"height": 11,
"opacity": 1,
"x": 0,
"y": 39
},
{
"items": [
{
"clip": false,
"interactive": false,
"items": [
{
"opacity": 1,
"x": 6,
"y": 6,
"fill": "transparent",
"shape": "stroke",
"size": 100,
"stroke": "#4c78a8",
"strokeWidth": 1.5,
"strokeDash": [
2,
4,
8,
4
]
}
],
"marktype": "symbol",
"role": "legend-symbol",
"zindex": 0
},
{
"clip": false,
"interactive": false,
"items": [
{
"fill": "#000",
"fontSize": 10,
"opacity": 1,
"x": 16,
"y": 6,
"align": "left",
"baseline": "middle",
"font": "Helvetica",
"limit": 160,
"text": "MSFT"
}
],
"marktype": "text",
"role": "legend-label",
"zindex": 0
}
],
"width": 47.11328125,
"height": 11,
"opacity": 1,
"x": 0,
"y": 52
}
],
"marktype": "group",
"role": "scope",
"zindex": 0
}
],
"x": 0,
"y": 16
}
],
"marktype": "group",
"role": "legend-entry",
"zindex": 0
},
{
"clip": false,
"interactive": false,
"items": [
{
"fill": "#000",
"fontSize": 11,
"fontWeight": "bold",
"opacity": 1,
"orient": "top",
"text": "symbol",
"font": "Helvetica",
"limit": 180,
"x": 0,
"y": 0,
"angle": 0,
"align": "left",
"baseline": "top"
}
],
"marktype": "text",
"role": "legend-title",
"zindex": 0
}
],
"orient": "right",
"x": 420,
"y": 0,
"width": 48,
"height": 79
}
],
"marktype": "group",
"role": "legend",
"zindex": 0
}
],
"fill": "transparent",
Expand Down
Loading