Jump to content
  • JavaScript Color Picker for Spotfire


    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

    colorpicker.gif.7c9af87e90b169e26b234d9096e2ee9b.gif


    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

    image.png.87bcb0a23558276c0bd0c85ea3af01e8.png

     

    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

    • Like 2

    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...