projectmesa / mesa-viz-tornado

Apache License 2.0
2 stars 8 forks source link

Missing labels and colors in charts #26

Closed wang-boyu closed 10 months ago

wang-boyu commented 12 months ago

Describe the bug

In the Schelling model, chart label is shown as "undefined" and colors are not rendered correctly:

Screenshot 2023-09-12 at 10 54 59 AM

Expected behavior

Chart label should be "happy" and color should be black, as specified in the code: https://github.com/projectmesa/mesa-examples/blob/6f3e077f2d3050e11852abfa29954eb06ef0a057/examples/schelling/server.py#L30

To Reproduce

Run the Schelling model from mesa-examples repo via mesa runserver.

Additional context

Probably introduced in https://github.com/projectmesa/mesa/pull/1685

The settings used in Mesa are "Color" and "Label" (with capital "C" and "L"). They were mapped to "borderColor" and "label" before the PR. With the PR they are used as-is.

rht commented 10 months ago

Updated #37 to fix this.