Add QChart to Python Chart (1 of 5)

Updating the python chart to render via a Qt Chart in addition
to the existing web page rendering.

Five aspects are planned:
1. Add QT chart option, basic rendering of Line+Scatter (this commit)
2. Add legend and axes, support for Pie and Bar charts
3. Add interactivity / hover etc
4. Add options for annotations and markers
5. Add more advanced charts and chart objects

There is an example in the tests folder, but at this point the
chart is very basic, but the main plumbing is in place.
This commit is contained in:
Mark Liversedge
2020-02-10 11:57:42 +00:00
parent d1e2f38e07
commit b4eb1191fd
11 changed files with 567 additions and 105 deletions

View File

@@ -0,0 +1,20 @@
{
"CHART":{
"VERSION":"1",
"VIEW":"analysis",
"TYPE":"43",
"PROPERTIES":{
"title":"Python ",
"subtitle":" ",
"widthFactor":"2",
"heightFactor":"2",
"style":"0",
"resizable":"0",
"script":"# python script\n\n## Retrieve power and cadence\nxx = GC.series(GC.SERIES_SECS)\nyy = GC.series(GC.SERIES_WATTS)\n\n## using qt charts\nGC.setChart(title=\"Power Time Series\", \n type=GC.CHART_LINE, \n animate=False);\n\nGC.addCurve(name=\"cadp\",x=xx,y=yy,\n size=2, color=\"gold\",\n #opacity=65, opengl=False,\n xaxis=\"Seconds\", yaxis=\"Power\")\n\n\n ",
"state":" ",
"showConsole":"1",
"asWeb":"0",
"__LAST__":"1",
}
}
}