Skip to content

Add basic templates of visualisation charts utilized in EasyTexture #30

Open
koshchii wants to merge 9 commits intodevelopfrom
texture-app
Open

Add basic templates of visualisation charts utilized in EasyTexture #30
koshchii wants to merge 9 commits intodevelopfrom
texture-app

Conversation

@koshchii
Copy link
Copy Markdown

This PR contains several new templates necessary for visualisations in EasyTexture, as well as modifications to existing templates used there.

trace.theta = newData.theta
trace.marker.color = newData.z
trace.marker.cmin = Math.min(newData.z)
trace.marker.cmax = Math.min(newData.z)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be Math.max(newData.z) instead?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, thanks

Comment on lines -22 to -24
setXAxisTitle()
setYAxisTitle()
setXyData()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: ''
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I added onColorbarTitleChanged

@koshchii koshchii requested a review from AndrewSazonov April 17, 2026 07:36
setYAxisTitle()
setColorbarTitle()
setShape()
setXyData()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be setXyzData() instead?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, fixed it

Comment on lines +140 to +141
trace.marker.cmin = Math.min(newData.z)
trace.marker.cmax = Math.min(newData.z)
trace.marker.cmax = Math.max(newData.z)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@koshchii koshchii requested a review from AndrewSazonov April 17, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants