open-plan-tool / gui

Energy Planning Application
Other
8 stars 4 forks source link

[Tool] In the result graphs assign similar colours to a production-, demand-, transformer-, storage- or provider asset #9

Open FredericHirschmueller opened 2 years ago

FredericHirschmueller commented 2 years ago

For a better overview in the result graphs it is usefull to assign similar colours for the same asset types.

For example: The values of the demand assets could be displayed with red lines using different tones. The values of the production assets could be displayed through green lines using different tones. Storage could be blue. Providers could be yellow. Transformers could be black.

Bachibouzouk commented 2 years ago

Here, for the bus factor, are the colors for the sankey graph/links between components (linked to energy carrier):

const energyColors = { electricity: 'rgb(255, 215, 0)', gas: 'rgb(250, 135, 117)', hydrogen: 'rgb(234, 95, 148)', heat: 'rgb(205, 52, 181)', fossil: 'rgb(0, 0, 255)' }

  const energyColorsOpacity = {
    electricity: 'rgba(255, 215, 0, 0.15)',
    gas: 'rgba(250, 135, 117, 0.15)',
    hydrogen: 'rgba(234, 95, 148, 0.15)',
    heat: 'rgba(205, 52, 181, 0.15)',
    fossil: 'rgba(0, 0, 255, 0.15)'
  }
Bachibouzouk commented 2 years ago

@bmlancien - I might ask you for color palettes once I categorized the options we would have

bmlancien commented 2 years ago

@bmlancien - I might ask you for color palettes once I categorized the options we would have

@Bachibouzouk Alright

Bachibouzouk commented 1 year ago

If we let the user choose the color of each asset (with color palette) in the asset forms we solve this issue (need to add this to the db of Assets model. Then user preferences could be set for each of the existing components under "account" so that one component has always the same color.

Bachibouzouk commented 1 year ago

One could also use different shades of colors for different instances of the same component type, for this one would need to convert the rgb to hsl and then change the hsl value of the base color : https://docs.python.org/3/library/colorsys.html

bmlancien commented 1 year ago

If we let the user choose the color of each asset (with color palette) in the asset forms we solve this issue (need to add this to the db of Assets model. Then user preferences could be set for each of the existing components under "account" so that one component has always the same color.

If we want to give this option, we should still use default colors on start with the option for the user to change the colors (but still same palette, otherwise that would get too messy).

One could also use different shades of colors for different instances of the same component type

How many instances can a component have? If it's getting a lot, I don't know if different shades would be enough to differentiate them.

Bachibouzouk commented 1 year ago

@bmlancien - there can be a lot of instances (no upper limit really), but I would think that 3 shades that repeat in a cycle would already cover a lot of usecases