Skip to content

Commit

Permalink
fix(_psych): fix psychrometric chart
Browse files Browse the repository at this point in the history
Loaded data must also use the colors provided to the parent psychrometric chart
  • Loading branch information
devang-chauhan committed Jan 12, 2022
1 parent 9201d77 commit 710c046
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ladybug_charts/_psych.py
@@ -1,6 +1,7 @@
"""Recreating ladybug psychrometric chart using Plotly."""


from ladybug.legend import LegendParameters
import numpy as np
import pandas as pd
import warnings
Expand Down Expand Up @@ -150,10 +151,9 @@ def _psych_chart(psych: PsychrometricChart, data: BaseCollection = None,
else:
var = data.header.data_type.name
chart_title = title if title else f'Psychrometric Chart - {var}'

lp = LegendParameters(colors=psych_dummy.legend_parameters.colors)
# add colored data mesh
mesh, graphic_container = psych_dummy.data_mesh(
data, psych_dummy.legend_parameters)
mesh, graphic_container = psych_dummy.data_mesh(data, lp)
cords = mesh_to_coordinates(mesh)
for count, cord in enumerate(cords):
fig.add_trace(
Expand Down

0 comments on commit 710c046

Please sign in to comment.