mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 02:28:54 +08:00
Pre-defined query file should be empty #24
This commit is contained in:
@@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
"query": "select * from invoices",
|
|
||||||
"chart": {
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"type": "scatter",
|
|
||||||
"mode": "lines",
|
|
||||||
"x": null,
|
|
||||||
"xsrc": "InvoiceId",
|
|
||||||
"meta": {
|
|
||||||
"columnNames": {
|
|
||||||
"x": "InvoiceId",
|
|
||||||
"y": "Total"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"y": null,
|
|
||||||
"ysrc": "Total"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"layout": {
|
|
||||||
"xaxis": {
|
|
||||||
"range": [
|
|
||||||
1,
|
|
||||||
412
|
|
||||||
],
|
|
||||||
"autorange": true,
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"yaxis": {
|
|
||||||
"range": [
|
|
||||||
-0.39166666666666683,
|
|
||||||
27.241666666666667
|
|
||||||
],
|
|
||||||
"autorange": true,
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"autosize": true,
|
|
||||||
"mapbox": {
|
|
||||||
"style": "open-street-map"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"frames": []
|
|
||||||
},
|
|
||||||
"name": "Invoices",
|
|
||||||
"id": "ieZfcITwDUTADwOmQlYyL",
|
|
||||||
"createdAt": "2020-11-03T14:17:49.524Z"
|
|
||||||
}
|
|
||||||
@@ -29,7 +29,7 @@ export default {
|
|||||||
xhr.onload = () => {
|
xhr.onload = () => {
|
||||||
if (xhr.readyState === 4) {
|
if (xhr.readyState === 4) {
|
||||||
if (xhr.status === 200) {
|
if (xhr.status === 200) {
|
||||||
resolve(JSON.parse(xhr.responseText))
|
resolve(JSON.parse(xhr.responseText || '[]'))
|
||||||
} else {
|
} else {
|
||||||
reject(xhr.statusText)
|
reject(xhr.statusText)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user