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

fixed issue in trend graph and pie chart #4536

Merged
merged 2 commits into from
Jan 8, 2021

Conversation

vivekshankar1
Copy link
Collaborator

πŸ”© Description: What code changed, and why?

  • Clicking on a date in trend graph is not loading data for that date.
  • Clicking on the pie chart does not open the reports page

Issue was caused due to the recent changes in d3 version from 5.16.0 to 6.3.1
According to the migration guide click here

// any pattern like this
selection.on("click", function(d, i, e) {
    console.log(d, i, e);
  })
// should be replaced by:
selection.on("click", function(event, d) {
  const e = selection.nodes();
  const i = e.indexOf(this);
  console.log(d, i, e);
})

I have made the changes in overview-failure component and overview-trend component.
Could not find any other places this pattern was not followed.

⛓️ Related Resources

#4515

πŸ‘ Definition of Done

  • open the compliance tab
  • clicking on a date in the trend chart should load data for that date
  • clicking on the piechart should open the reports page

πŸ‘Ÿ How to Build and Test the Change

inside habitat studio:

  • start_all_services
  • load data using load_compliance_reports

In the browser

  • open a2-dev.test
  • clicking on a date in the trend chart should load data for that date
  • clicking on the piechart should open the reports page

βœ… Checklist

πŸ“· Screenshots, if applicable

Screenshot 2021-01-08 at 9 13 05 PM

Screenshot 2021-01-08 at 9 13 15 PM

@netlify
Copy link

netlify bot commented Jan 8, 2021

πŸ‘· Deploy preview for chef-automate processing.

πŸ”¨ Explore the source changes: e85bc56

πŸ” Inspect the deploy logs: https://app.netlify.com/sites/chef-automate/deploys/5ff87f2917d6a30007f23205

Signed-off-by: Vivek Shankar <vshankar@progress.com>
Copy link
Contributor

@tarablack01 tarablack01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job πŸŽ‰

@tarablack01 tarablack01 merged commit 6b3233a into master Jan 8, 2021
@tarablack01 tarablack01 deleted the bug/fixed-trend-graph-and-pie-chart-issue branch January 8, 2021 19:41
@vivekshankar1 vivekshankar1 self-assigned this Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants