Skip to content

Commit

Permalink
Extracting common ChartType DU (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
breki committed Dec 24, 2020
1 parent 42ba9e5 commit 42a821f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/visualizations/AgeGroupsTimelineViz/Rendering.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module AgeGroupsTimelineViz.Rendering
open System
open DataAnalysis.DatedTypes
open DataAnalysis.AgeGroupsTimeline
open DataVisualization.ChartingTypes
open Synthesis
open Highcharts
open Types
Expand Down Expand Up @@ -133,6 +134,7 @@ let renderChartOptions state dispatch =
match state.Metrics.ChartType with
| StackedBarNormal -> pojo {| stacking = "normal" |}
| StackedBarPercent -> pojo {| stacking = "percent" |}
| _ -> invalidOp "not supported"
|}
legend = pojo {| enabled = true ; layout = "horizontal" |}
tooltip = pojo {|
Expand Down
1 change: 1 addition & 0 deletions src/visualizations/DataVisualization/ChartingTypes.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
type ChartType =
| StackedBarNormal
| StackedBarPercent
| SplineChart
5 changes: 1 addition & 4 deletions src/visualizations/InfectionsChart.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[<RequireQualifiedAccess>]
module InfectionsChart

open DataVisualization.ChartingTypes
open Statistics
open System
open Elmish
Expand Down Expand Up @@ -51,10 +52,6 @@ module Metrics =
| ShowOthers -> without AllConfirmed

type ValueTypes = RunningTotals | MovingAverages
type ChartType =
| StackedBarNormal
| StackedBarPercent
| SplineChart

type DisplayType = {
Id: string
Expand Down
5 changes: 1 addition & 4 deletions src/visualizations/MetricsCorrelationViz/Rendering.fs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module MetricsCorrelationViz.Rendering

open DataVisualization.ChartingTypes
open Statistics
open System
open Elmish
Expand Down Expand Up @@ -38,10 +39,6 @@ module Metrics =
]

type ValueTypes = RunningTotals | MovingAverages
type ChartType =
| StackedBarNormal
| StackedBarPercent
| SplineChart

type DisplayType = {
Id: string
Expand Down

0 comments on commit 42a821f

Please sign in to comment.