-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Corrects a bug in Chart.js Module and some other issues #438
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
Conversation
Update from master
Corrects: visualization of ticks on x-axis when chart has too many values (projectmesa#77) and a bug occurring when the reset button is pressed
Color code must have # to work properly.
In order to work properly, we must collect data after defining the initial state of the model (step 0) and after each step. So, we must collect data as the last line of model __init__ and after each schedule.step(). Corrects projectmesa#268
| data: chartData, | ||
| options: chartOptions | ||
| while (chart.data.labels.length) { chart.data.labels.pop(); } | ||
| chart.data.datasets.forEach((dataset) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I think it is by and large appropriate to use => notation for declaring functions, since we are not using any sort of build process, it is best for the time being to use the long-form declaration of functions.
chart.data.datasets.forEach(function(dataset) {
while (dataset.data.length) {
dataset.data.pop();
}
})
| self.grid[y][x] = citizen | ||
| self.schedule.add(citizen) | ||
|
|
||
| # collect initial data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The duplicated collect initial data comments seem unnecessary given that we're calling datacollector.collect.
TaylorMutch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cauemello See my comment about your comments. I will try to test your changes soon!
some adjustments
|
@cauemello I will look over this tonight and see if we can get this taken care of. |
|
Hi @TaylorMutch , is this PR out of Mesa 0.8.3 release? Did you find any problem with the code? |
TaylorMutch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, sorry for the long wait.
Corrects a bug in Chart.js Module and some other issues
This PR corrects:
1- a bug occurring in chart when the reset button was pressed.
2- the ticks visualization on x-axis when chart has too many values => #77
3- the datacollector data with the corresponding model step * => #268