dataset insert error
See original GitHub issueHello,
There seems to be an error while trying to insert the dataset to vegaEmbed:
Uncaught (in promise) SyntaxError: Unexpected token m in JSON at position 0
Here is the code:
const defData = [
{ "a": "A", "b": 28 }, { "a": "B", "b": 55 }, { "a": "C", "b": 43 },
{ "a": "D", "b": 91 }, { "a": "E", "b": 81 }, { "a": "F", "b": 53 },
{ "a": "G", "b": 19 }, { "a": "H", "b": 87 }, { "a": "I", "b": 52 }
]
const spec = {
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A simple bar chart with embedded data.",
"data": {
"name": 'data1',
"values": 'myData'
},
"mark": "bar",
"encoding": {
"x": { "field": "a", "type": "nominal", "axis": { "labelAngle": 0 } },
"y": { "field": "b", "type": "quantitative" }
}
}
vegaEmbed('#view', spec).then( res => {
res.view
.insert('myData', defData)
.run()
window.view = res.view
})
The data loads ok when insert into the “name” tag. The same error is at my Vega spec where I have multiple data object in the array - so I need the “name” tag.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Errors in inserting data to database - Stack Overflow
Show activity on this post. Actually,I'm inserting unique data to the primary key field. But it is not saved to the database. @AkilaRanasingha ......
Read more >SQL INSERT Error – Q&A Hub | 365 Data Science
This error appears if you have already created another table, employees, where you have missed inserting data about the individual with id ...
Read more >Error with DATABASE insert Activity - UiPath Community Forum
While using Insert activity to insert datatable into database, there is an issue as there are spaces in the column name.
Read more >Database Engine events and errors - SQL Server
Consult this MSSQL error code list to find explanations for error messages for SQL Server database engine events.
Read more >Question: Data insert error not being picked up by try catch.
I.e. data flowing to the Insert object, no errors, but no data being inserted ... Relates to dates and date formats .. Insert...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You need to remove
"values": 'data_len',
.SO I removed the values tag and inserted under the name tag. Thank you very much!!