Skip to content
Snippets Groups Projects
Commit 78ae6745 authored by Janne Alatalo's avatar Janne Alatalo :neutral_face:
Browse files

Add functions for getting indicator colors

parent bc3ab053
No related branches found
No related tags found
No related merge requests found
import Rainbow from 'rainbowvis.js';
const color_spectrum = ["orange", "yellow", "green"];
const undef_color = "grey";
class LamStation {
constructor(id, coordinates, avg_speed_dir1, avg_speed_dir2, data) {
......@@ -12,7 +15,7 @@ class LamStation {
this.traffic_vol_dir1 = null;
this.traffic_vol_dir2 = null;
this.rainbow = new Rainbow();
this.rainbow.setSpectrum("orange", "yellow", "green");
this.rainbow.setSpectrum(...color_spectrum);
this.rainbow.setNumberRange(0.0, 1.0);
this.data = data
}
......@@ -118,4 +121,12 @@ class LamStation {
}
export function get_color_spectrum() {
return color_spectrum.slice();
}
export function get_undef_color() {
return undef_color;
}
export default LamStation;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment