Skip to content

Conversation

@cauemello
Copy link
Contributor

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

  • 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: 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
@coveralls
Copy link

coveralls commented Dec 7, 2017

Coverage Status

Coverage remained the same at 82.911% when pulling 872a83b on cauemello:master into 67f14ab on projectmesa:master.

data: chartData,
options: chartOptions
while (chart.data.labels.length) { chart.data.labels.pop(); }
chart.data.datasets.forEach((dataset) => {
Copy link
Contributor

@TaylorMutch TaylorMutch Dec 7, 2017

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();
    }
})

@coveralls
Copy link

coveralls commented Dec 7, 2017

Coverage Status

Coverage remained the same at 82.911% when pulling 9ab0397 on cauemello:master into 67f14ab on projectmesa:master.

self.grid[y][x] = citizen
self.schedule.add(citizen)

# collect initial data
Copy link
Contributor

@TaylorMutch TaylorMutch Dec 8, 2017

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.

Copy link
Contributor

@TaylorMutch TaylorMutch left a 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
@coveralls
Copy link

coveralls commented Dec 11, 2017

Coverage Status

Coverage remained the same at 82.911% when pulling 1df1ff6 on cauemello:master into 67f14ab on projectmesa:master.

@TaylorMutch
Copy link
Contributor

@cauemello I will look over this tonight and see if we can get this taken care of.

@cauemello
Copy link
Contributor Author

Hi @TaylorMutch , is this PR out of Mesa 0.8.3 release? Did you find any problem with the code?

Copy link
Contributor

@TaylorMutch TaylorMutch left a 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.

@TaylorMutch TaylorMutch merged commit 362de59 into projectmesa:master Jan 20, 2018
@jackiekazil jackiekazil added this to the Unknown milestone milestone Nov 22, 2020
EwoutH pushed a commit that referenced this pull request Oct 12, 2024
Corrects a bug in Chart.js Module and some other issues
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.

4 participants