Skip to content
Snippets Groups Projects
Commit aefbaab8 authored by Emanuele Laface's avatar Emanuele Laface
Browse files

added zoom second plot

parent c6aa13d8
No related branches found
Tags 3.6.10 3.6.13
No related merge requests found
Pipeline #207725 passed
......@@ -113,7 +113,7 @@
"value": "var data = [];\n\nfor (const pvname in datasources.ts) {\n const datavalues = datasources[\"ts\"][pvname].map(values => {\n values[0] += 3600000;\n return values;\n });\n data.push({data: datavalues});\n}\n\nreturn data;",
"yticks": "var maxtemp = 0;\n\nfor (const pvname in datasources.ts) {\n const pvmax = Math.max(...datasources[\"ts\"][pvname].map(values => values[1]));\n maxtemp = Math.max(maxtemp, pvmax);\n}\n\nvar mintemp = 400;\n\nfor (const pvname in datasources.ts) {\n const pvmin = Math.min(...datasources[\"ts\"][pvname].map(values => values[1]));\n mintemp = Math.min(maxtemp, pvmin);\n}\n\nlet step=(maxtemp-mintemp)/5;\n\nvar yticks=[];\n\nfor (i=mintemp; i<=maxtemp+step; i+=step) {\n yticks.push([i,i.toFixed(1).toString()]);\n}\n\nyticks[yticks.length-1] = [yticks[yticks.length-1][0],\"T [K]\"];\n\nreturn yticks;",
"x_timestamp": true,
"zoom": ""
"zoom": "xy"
}
}
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment