Skip to content

Instantly share code, notes, and snippets.

@zoek1
Last active October 5, 2022 12:51
Show Gist options
  • Save zoek1/6b363910f79abd3c92c9b4c706f84880 to your computer and use it in GitHub Desktop.
Save zoek1/6b363910f79abd3c92c9b4c706f84880 to your computer and use it in GitHub Desktop.
{
"labels": $distinct(data.trade.token.name),
"datasets": [
{
"label": "Dataset 1",
"data": data.trade[token.name="tzBTC"].{
"x": $number(tezQty),
"r": 10 + ($number(slippage) * 100),
"y": $number(price)
},
"borderColor": "rgb(250, 178, 55)",
"backgroundColor": "rgba(250, 178, 55, 0.6)"
}
]
}
{
"title": {
"display": true,
"text": "Custom Chart Title",
"padding": {
"top": 10,
"bottom": 30
}
},
"scales": {
"y": {
"display": true,
"text": "Price"
},
"x": {
"display": true,
"text": "Tezos Quantity"
}
},
"layout": {
"padding": 170
}
}
query MyQuery {
trade(limit: 10) {
id
token {
name
}
tokenQty
tezQty
slippage
price
exchange {
name
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment