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

Use Highcharts fork with temporary .flat prop fix for missing plotline label #142

Merged
merged 1 commit into from
Sep 20, 2018

Conversation

cfarm
Copy link
Contributor

@cfarm cfarm commented Sep 20, 2018

This PR updates cfpb-chart-builder to temporarily use a fork of Highcharts. The fork fixes a conflicting .flat JS property which caused missing plotline labels (the projected data label) on all the charts that have projected data.

The bug is in Chrome 69 and Firefox 62, in older versions of Highcharts. See this issue with description of the bug: highcharts/highcharts#8477

Here is the bug fix, from Highcharts v6.1.2: highcharts/highcharts@83b5d31

We had to backport this bug fix to an older version of Highcharts so we can launch with cfpb-chart-builder on Highcharts v5.0.11. We will upgrade to v6 post-launch ASAP but we anticipate major CSS development to get the charts working in our supported browsers and styled to match our designs, hence this PR.

Read the "Notes" below for a detailed description of how the forked Highcharts package was created.

Additions

Removals

Changes

Testing

  • ./setup.sh
  • gulp watch
  • go to http://localhost:5000/ and verify the "Values after ___ are projected" labels are visible on Origination activity, bar charts, and inquiry index charts

Screenshots

screen shot 2018-09-19 at 9 29 51 pm
screen shot 2018-09-19 at 9 29 46 pm
screen shot 2018-09-19 at 9 29 41 pm

Notes

more detailed description TBA, for now here were the steps i took. i'll add more context on why:

  1. fix in cfarm/highcharts source
  2. compile the JS in the same cfarm/highcharts repo:
    • npm install
    • gulp scripts --file highcharts.src.js,highmaps.src.js,highstock.src.js,modules/stock.src.js
  3. copy these files from the highcharts/code folder to github cfarm/highcharts-dist (overwriting existing files):
    • highcharts.src.js
    • highmaps.src.js
    • highstock.src.js
    • modules/stock.src.js
    • js/highcharts.src.js
    • js/highmaps.src.js
    • js/highstock.src.js
    • js/modules/stock.src.js
  4. minify the above files in highcharts-dist:
  5. fork the fix in cfpb/highcharts and cfpb/highcharts-dist instead of cfarm

Todos

  • test in all supported browsers with Sauce

Checklist

  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the front end playbook
  • Passes all existing automated tests
  • New functions include new tests
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged
  • Visually tested in supported browsers and devices
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)

@cfarm
Copy link
Contributor Author

cfarm commented Sep 20, 2018

y'all don't let me merge this without testing in all supported browswers

Copy link
Member

@anselmbradford anselmbradford left a comment

Choose a reason for hiding this comment

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

Tested in latest Chrome, FF, Safari, and Opera. Does not work in IE, but this is a different issue https://[GHE]/CFGOV/platform/issues/3025

@cfarm cfarm merged commit 70d3529 into master Sep 20, 2018
@anselmbradford anselmbradford deleted the fix-missing-plotline-label branch September 20, 2018 15:38
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.

2 participants