You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a scatter-3d plot with a data array of two traces: the first one is used to plot the funciton i want to show, the second one contains the clicked element with a different color. In this way when I click a point the point changes its color. Now this works, but quite often, the redraw method doesn't work for the second trace and i get this warning:
[.Offscreen-For-WebGL-049BA980]RENDER WARNING: Render count or primcount is 0.
here it is the snippet
this.$.plot3d.on('plotly_click', function(d){
var point_number = d.points[0].pointNumber
var id = parseFloat(d.points[0].data.incrementalID[point_number])
var index = util.issetArrayElement(data[1].incrementalID,id)
if(index == -1){
data[1].x.push(d.points[0].x)
data[1].y.push(d.points[0].y)
data[1].z.push(d.points[0].z)
data[1].incrementalID.push(id)
data[1].uniqueID.push(parseFloat(d.points[0].data.uniqueID[point_number])
Plotly.redraw(self.$.plot3d)
}
})
Moreover, if i remove the point from the first trace, (so, the clicked point belongs only to the second trace ), the point disappears, so it seems like my second trace during the redraw is not redrawn at all.
Here it is the second snippet:
this.$.plot3d.on('plotly_click', function(d){
point_number = d.points[0].pointNumber
var id = parseFloat(d.points[0].data.incrementalID[point_number])
var index_1 = util.issetArrayElement(data[1].incrementalID,id)
var index_0 = util.issetArrayElement(data[0].incrementalID,id)
if(index_1 == -1){
data[1].x.push(d.points[0].x)
data[1].y.push(d.points[0].y)
data[1].z.push(d.points[0].z)
data[1].incrementalID.push(id)
data[1].uniqueID.push(parseFloat(d.points[0].data.uniqueID[point_number]))
util.removeArrayElement(data[0].x,index_0)
util.removeArrayElement(data[0].y,index_0)
util.removeArrayElement(data[0].z,index_0)
util.removeArrayElement(data[0].incrementalID,index_0)
util.removeArrayElement(data[0].uniqueID,index_0)
}
redrawing = true
Plotly.redraw(self.$.plot3d)
})
I cannot figure out why
The text was updated successfully, but these errors were encountered:
I'm sorry. Here it is a fully runnuble code. It's strange, because the point in the positive face (i just put one point there) works as expected (it changes its color), it's not the same for the other points.
In the code there's also the workaround for the issue #1025 (line 96)
I have a scatter-3d plot with a data array of two traces: the first one is used to plot the funciton i want to show, the second one contains the clicked element with a different color. In this way when I click a point the point changes its color. Now this works, but quite often, the redraw method doesn't work for the second trace and i get this warning:
[.Offscreen-For-WebGL-049BA980]RENDER WARNING: Render count or primcount is 0.
here it is the snippet
Moreover, if i remove the point from the first trace, (so, the clicked point belongs only to the second trace ), the point disappears, so it seems like my second trace during the redraw is not redrawn at all.
Here it is the second snippet:
I cannot figure out why
The text was updated successfully, but these errors were encountered: