-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Description
When a dash_vtk.VolumeController component is included as a child to dash_vtk.VolumeRespresentation or dash_vtk.VolumeDataRespresentation it overrides the 'colorMapPreset' property of the VolumeRepresentation, rendering the volume with the 'erdc_rainbow_bright' colormap.
Steps/Code to Reproduce
import random
import dash
from dash import html
import dash_vtk
random.seed(42)
app = dash.Dash(name)
server = app.server
volume_view = dash_vtk.View(
children=dash_vtk.VolumeDataRepresentation(
spacing = [1, 1, 1],
dimensions = [10, 10, 10],
origin = [0, 0, 0],
scalars = [random.random() for _ in range(1000)],
rescaleColorMap = True,
colorDataRange = [0,1],
#volumeController= False,
colorMapPreset = 'Cold and Hot'
)
)
app.layout = html.Div(
style={"height": "calc(100vh - 16px)"},
children=[
html.Div(children=volume_view, style={"height": "100%", "width": "100%"})
],
)
if name == "main":
app.run_server(debug=True)
Expected Results
Actual Results
Versions
Dash 2.12.1
Dash Core Components 2.0.14
Dash HTML Components 2.11.1
Dash VTK 0.0.9
Browser: Chrome - Version 116.0.5845.112 (Official Build) (64-bit)