-
Notifications
You must be signed in to change notification settings - Fork 1
Example: Legend Example
Elliott Ridgway edited this page May 25, 2021
·
1 revision
Adding a legend to Watchr graphs is easy. All you need to do is add "legend": "true"
to the "plot" section of your config, as shown below.
{
"plots" : {
"files" : {
"fileName": "performance_*",
"type" : "json"
},
"plot" : [
{
"name" : "Plot with Legend",
"legend" : "true",
"dataLines" : [
{
"name" : "Data Line",
"x" : {
"getPath": "performance-report/nightly_run_*",
"getKey" : "date",
"unit" : "date"
},
"y" : {
"getPath": "performance-report/nightly_run_*/measurement",
"getKey" : "value",
"unit" : "seconds"
}
}
]
}
]
}
}
{
"performance-report" : {
"nightly_run_2021-04-05" : {
"date" : "2021-04-05T22:21:21",
"measurement": {
"value":"1.0"
}
}
}
}
watchr config.json performance_data.json