Skip to content

Commit

Permalink
hide yAxis labels on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
lukarenko committed Dec 10, 2020
1 parent 21bb868 commit d15b8d5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/visualizations/DailyComparisonChart.fs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,18 @@ let renderChartOptions (state : State) dispatch =
href = "https://www.nijz.si/sl/dnevno-spremljanje-okuzb-s-sars-cov-2-covid-19"
|}

responsive = pojo
{|
rules =
[| {|
condition = {| maxWidth = 768 |}
chartOptions =
{|
yAxis = [| {| labels = pojo {| enabled = false |} |} |]
|}
|} |]
|}

navigator = pojo {| enabled = false |}
scrollbar = pojo {| enabled = false |}
rangeSelector = pojo {| enabled = false |}
Expand Down
11 changes: 11 additions & 0 deletions src/visualizations/ExcessDeathsChart/Absolute.fs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ let renderChartOptions (data : WeeklyDeathsData) =
yAxis = {| min = 0 ; title = {| text = None |} ; opposite = true |}
tooltip = {| formatter = fun () -> sprintf "%s<br>%s: <b>%d</b>" jsThis?series?name jsThis?key jsThis?y |} |> pojo
series = series
responsive = pojo
{|
rules =
[| {|
condition = {| maxWidth = 768 |}
chartOptions =
{|
yAxis = [| {| labels = pojo {| enabled = false |} |} |]
|}
|} |]
|}
credits =
{| enabled = true
text = sprintf "%s: %s"
Expand Down
11 changes: 11 additions & 0 deletions src/visualizations/ExcessDeathsChart/Relative.fs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,17 @@ let renderChartOptions (data : WeeklyDeathsData) (statsData : StatsData) =
yAxis = {| title = {| text = None |} ; opposite = true ; labels = {| formatter = fun (x) -> x?value + " %" |} |> pojo |}
tooltip = {| formatter = fun () -> sprintf "%s: <b>%.1f %%</b>" jsThis?key jsThis?y |} |> pojo
series = series
responsive = pojo
{|
rules =
[| {|
condition = {| maxWidth = 768 |}
chartOptions =
{|
yAxis = [| {| labels = pojo {| enabled = false |} |} |]
|}
|} |]
|}
credits =
{| enabled = true
text = sprintf "%s: %s, %s"
Expand Down

0 comments on commit d15b8d5

Please sign in to comment.