Add basic templates of visualisation charts utilized in EasyTexture #30
Add basic templates of visualisation charts utilized in EasyTexture #30
Conversation
…nd 2d plots using rectangular patches
| trace.theta = newData.theta | ||
| trace.marker.color = newData.z | ||
| trace.marker.cmin = Math.min(newData.z) | ||
| trace.marker.cmax = Math.min(newData.z) |
There was a problem hiding this comment.
Should this be Math.max(newData.z) instead?
| setXAxisTitle() | ||
| setYAxisTitle() | ||
| setXyData() |
There was a problem hiding this comment.
If setXAxisTitle(), setYAxisTitle(), and setXyData() (now setPlotData()) are not called after the HTML page finishes loading, then the chart keeps using the default values hardcoded in the HTML template, not the values already set in the QML wrapper.
There was a problem hiding this comment.
good points, thanks. I added these lines here and in the other charts as well
| property bool loadSucceededStatus: false | ||
| property string xAxisTitle: '' | ||
| property string yAxisTitle: '' | ||
| property string colorbarTitle: '' |
There was a problem hiding this comment.
colorbarTitle is introduced in Plotly2dHeatmap.qml, but the expected chain to propagate this change to the HTML template seems to be missing. Unlike Plotly2dPolarHeatmap.qml, I do not see onColorbarTitleChanged -> setColorbarTitle() here.
There was a problem hiding this comment.
thanks, I added onColorbarTitleChanged
| setYAxisTitle() | ||
| setColorbarTitle() | ||
| setShape() | ||
| setXyData() |
There was a problem hiding this comment.
Should this be setXyzData() instead?
| trace.marker.cmin = Math.min(newData.z) | ||
| trace.marker.cmax = Math.min(newData.z) | ||
| trace.marker.cmax = Math.max(newData.z) |
There was a problem hiding this comment.
Another issue here: Math.min() / Math.max() won’t work correctly when passed the array directly. We need to spread newData.z, just like above on line 85 (cmin: Math.min(...data.z)), so this should be:
trace.marker.cmin = Math.min(...newData.z)
trace.marker.cmax = Math.max(...newData.z)…ation in Plotly2dPolarHeatmap.html
This PR contains several new templates necessary for visualisations in EasyTexture, as well as modifications to existing templates used there.