Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE: Add optional title feature to ChartModule #1666

Closed
wants to merge 1 commit into from

Conversation

catherinedevlin
Copy link
Contributor

Closes projectmesa/mesa-viz-tornado#23

Supersedes #955 - that code is fine, but old enough that rebasing with the current main seems hopeless.

Also, it includes an example that needs to be added to mesa-examples in a separate PR. When that PR is ready, will remove the "DO NOT MERGE" on this one.

Updated docs to point to mesa-examples

format fix
@catherinedevlin
Copy link
Contributor Author

I'm not able to make this work after all.

An experiment in https://github.com/projectmesa/mesa-examples/blob/main/examples/charts/charts/server.py is showing
elements.push(new ChartModule([{"Label": "Rich", "Color": "#2ca02c"}, {"Label": "Poor", "Color": "#d62728"}, {"Label": "Middle Class", "Color": "#1f77b4"}], 500, 200, 'sample line chart title'));

showing up in the javascript of the running example, but no resulting title text, and I don't know enough JavaScript to figure out why.

Also, even if it worked, it looks not only like ChartVisualization.py, but also BarChartVisualization.py and PieChartVisualization.py (mabye everything in visualization/modules) would need corresponding changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option title for ChartModule
2 participants