Skip to content
This repository was archived by the owner on Mar 18, 2022. It is now read-only.

Adding Mobile Views for charts.#1

Open
JessicaInTime wants to merge 8 commits into
masterfrom
chart-mobile
Open

Adding Mobile Views for charts.#1
JessicaInTime wants to merge 8 commits into
masterfrom
chart-mobile

Conversation

@JessicaInTime
Copy link
Copy Markdown

This PR contains all the changes for the Map, Range, Bar and Stack charts that needed to be updated or written for a mobile/tablet view.

These changes should not affect the desktop view unless the desktop viewport has been made to a much narrower view.

there are 2 main issues still need to be fixed,

1 being the height of the svg viewport, needs to be correctly calculated for to display all of the bar chart and size the chart accordingly for the mobile view to be about have the height of the screen viewport.

2 is the text colour in the bar chart on the darker bar colours, need to figure out a way to have the appropriate text colour for display because some text in the chart will be ontop of a whiteback ground or a coloured bar.
Unfortunately using a gradient didn't work due to the bar colours not blending well with grey like colours on top
The tick labels are now moved inside the chart and the chart expands its width for a mobile screen

When in a mobile view, clicking on a colour bar group will now move the text to the beyond the end of the bar, to help readability
Also included the white space fixes for certain sizes

Added bounce animation for when the range chart is over the stop points
@JessicaInTime JessicaInTime requested a review from vladh November 12, 2018 09:23
Copy link
Copy Markdown
Author

@JessicaInTime JessicaInTime left a comment

Choose a reason for hiding this comment

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

@vladh already spotted a couple warts =((

let legend = this.g
.append('g')
.attr('class', 'legend')
.attr('transform', `translate(0, ${24})`)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oops =( this was a test, anyways, i will update this when fixing the legend for the stacked chart.

.extra-details__content
margin-top 2rem

@media screen and (min-device-width: 375px) and (max-device-width: 667px)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Need to fix this to be min-device-width 360px

Comment thread package.json
"private": true,
"dependencies": {
"async": "^1.5.0",
"current-device": "^0.7.8",
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oops forgot the package-lock.json need to update this

@vladh vladh removed their request for review December 4, 2020 10:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant