Here is a simple way to convert a regular input Spotfire Control as a color picker. The approach is similar to the JavaScript Date and Time Pickers for Spotfire
Create an Input field Property Control by editing a text area in HTML mode and wrap the Spotfire control with a span element and some identifier and add the ColorPicker.js JavaScript to the text area
html
<span id="color"> <SpotfireControl id="this is an input-field string dp control " /> </span>
ColorPicker.js
colorInput = document.querySelector("#color input")
colorInput.type="color"
Congratulations! Now you have a color picker.. but now what? Here is a use case in which you could use this color picker
Back to the JavaScript Component Hub for Spotfire
Disclaimer
This method makes assumptions about the inner workings of Spotfire version 12.0.0 LTS Any analyses created using this hack may cause instability and performance issues and are likely to break when Spotfire is upgraded or hotfixed in the future. Any issues resulting from applying this hack are not covered by Spotfire maintenance agreements and Support will not assist in troubleshooting problems with analysis files where this approach is used.
- 2
Recommended Comments
There are no comments to display.