-
This scatter plot is using Obsidian Chart plugin (that uses chart js). The syntax is different a bit and code block is using advanced-chart insted
- the following code block will produce the chart below. If I don’t want line, just change the
"type": line
to "type": scatter
code block
{
"type": "line",
"data":
{
"datasets":
[{
"label": "Scatter Dataset",
"data": [
{ "x": 10, "y": 2.30 },
{ "x": "20", "y": "3.00" },
{ "x": "30", "y": "3.40" },
{ "x": "40", "y": "3.69" }],
"backgroundColor": "rgb(255, 99, 132)"
}]
},
"options": { "scales": { "x": { "type": "linear", "position": "bottom"} } }
}
rendered chart
{
"type": "line",
"data":
{
"datasets":
[{
"label": "Scatter Dataset",
"data": [
{ "x": 10, "y": 2.30 },
{ "x": "20", "y": "3.00" },
{ "x": "30", "y": "3.40" },
{ "x": "40", "y": "3.69" }],
"backgroundColor": "rgb(255, 99, 132)"
}]
},
"options": { "scales": { "x": { "type": "linear", "position": "bottom"} } }
}
{
"type": "scatter",
"data":
{
"datasets":
[{
"label": "Scatter Dataset",
"data": [
{"x":-10, "y":0},
{"x":-0, "y":5},
{"x":5, "y":7}
],
"backgroundColor": "rgb(255, 99, 132)"
}]
},
"options": { "scales": { "x": { "type": "linear", "position": "bottom"} } }
}
- topic:: 00 Coding00 Coding
#MOC / for programming language, coding guide and libraries focusing on data analytics and html/css
- updated:: 2022-09-30 Private or Broken Links
The page you're looking for is either not available or private!
- reviewed:: 2022-09-30 Private or Broken Links
The page you're looking for is either not available or private!
- #Reference