Hi @henilvaland @shahnawazvhora7333, I am new to Grafana and had a query : Can we use JSON data format to configure a Node Graph in Grafana ?
For example can we use something like this :
[
{
"fields": [
{
"name": "id",
"type": "string",
"config": {
"links": [
{
"title": "test data link",
"url": "",
"internal": {
"query": {
"scenarioId": "logs",
"alias": "from service graph",
"stringInput": "tes"
},
"datasourceUid": "gdev-testdata",
"datasourceName": "gdev-testdata"
}
}
]
},
"values": [
"root",
"service:1",
"service:2",
"service:3",
"service:4",
"service:5",
"service:6",
"service:7",
"service:8",
"service:9"
]
},
{
"name": "mainstat",
"type": "number",
"config": {
"displayName": "Transactions per second"
},
"values": [
0.5269084489952305,
0.3186172070712774,
0.0217189888767102,
0.23881712564156032,
0.8115396296859896,
0.9600485890145185,
0.8605002419520664,
0.6896544605115285,
0.7066672691468294,
0.9905411582046693
]
},
{
"name": "secondarystat",
"type": "number",
"config": {
"displayName": "Average duration"
},
"values": [
0.5360624488395105,
0.8088904153561247,
0.3949131736355005,
0.40714005398818776,
0.9925655948029481,
0.8141737809302889,
0.35716677938480146,
0.18012858235383256,
0.7106872573185647,
0.2455825750261207
]
},
{
"name": "arc__success",
"type": "number",
"config": {
"color": {
"fixedColor": "green",
"mode": "fixed"
},
"displayName": "Success"
},
"values": [
1,
0.009825831912042116,
0.6809865086881657,
0.02142287422487632,
0.5066214145905183,
0.5801643496033606,
0.6150000368161581,
0.561365727033396,
0.8082503303402178,
0.2160674573708321
]
},
{
"name": "arc__errors",
"type": "number",
"config": {
"color": {
"fixedColor": "red",
"mode": "fixed"
},
"displayName": "Errors"
},
"values": [
0,
0.9901741680879579,
0.3190134913118343,
0.9785771257751237,
0.49337858540948165,
0.4198356503966394,
0.3849999631838419,
0.43863427296660396,
0.19174966965978224,
0.7839325426291679
]
}
],
"meta": {
"preferredVisualisationType": "nodeGraph"
},
"name": "nodes"
},
{
"name": "edges",
"fields": [
{
"name": "id",
"values": [
"root--service:1",
"root--service:2",
"root--service:4",
"root--service:6",
"service:1--service:3",
"service:2--service:5",
"service:2--service:7",
"service:3--service:1",
"service:4--service:6",
"service:5--service:7",
"service:5--service:8",
"service:6--service:9",
"service:6--service:2"
],
"type": "string",
"state": null
},
{
"name": "source",
"values": [
"root",
"root",
"root",
"root",
"service:1",
"service:2",
"service:2",
"service:3",
"service:4",
"service:5",
"service:5",
"service:6",
"service:6"
],
"type": "string",
"config": {},
"state": null
},
{
"name": "target",
"values": [
"service:1",
"service:2",
"service:4",
"service:6",
"service:3",
"service:5",
"service:7",
"service:1",
"service:6",
"service:7",
"service:8",
"service:9",
"service:2"
],
"type": "string",
"config": {},
"state": null
}
],
"meta": {
"preferredVisualisationType": "nodeGraph"
},
"length": 13
}
]
And also, if I want to use SQL then, how will we storing things like config.displayName
in the table ?
Also please provide any resources (if you have) for configuring advanced properties of nodes like color, displayName, etc.
Thanks !!