Map value to color scale

后端 未结 5 767
执念已碎
执念已碎 2021-01-18 11:13

I have a list of values which should be plotted to a map with a certain color. The plotting to the map is already done, but I need to figure out a way to map the value

5条回答
  •  北海茫月
    2021-01-18 11:49

    There is I2UI for this.

    A B C D E

    There is a color range: from "Gray" - to "Green". The span element that has lowest rate value get the "Gray" color, the element with the biggest rate get "Green" color.

    Thus, the span that are between edges get the color that has direct ratio to its rate.

    Also, call JavaScript i2.emph() after the previous HTML have been loaded.

    See demo

提交回复
热议问题