@@ -1050,110 +1050,185 @@ module Chart2D =
1050
1050
|> GenericChart.mapLayout ( Layout.style ( FunnelMode = StyleParam.FunnelMode.Stack))
1051
1051
1052
1052
/// Creates a waterfall chart. Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values
1053
- ///
1054
- /// Parameters:
1055
- ///
1056
- /// x : Sets the x coordinates.
1057
- ///
1058
- /// y : Sets the y coordinates.
1059
- ///
1060
- /// Base : Sets where the bar base is drawn (in position axis units).
1061
- ///
1062
- /// Width : Sets the bar width (in position axis units).
1063
- ///
1064
- /// Measure : An array containing types of values. By default the values are considered as 'relative'. However; it is possible to use 'total' to compute the sums. Also 'absolute' could be applied to reset the computed total or to declare an initial value where needed.
1065
- ///
1066
- /// Orientation : Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal).
1067
- ///
1068
- /// Connector : Sets the styling of the connector lines
1069
- ///
1070
- /// AlignmentGroup : Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
1071
- ///
1072
- /// OffsetGroup : Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
1073
- ///
1074
- /// Offset : Shifts the position where the bar is drawn (in position axis units). In "group" barmode, traces that set "offset" will be excluded and drawn in "overlay" mode instead.
1075
1053
[<Extension>]
1076
1054
static member Waterfall
1077
1055
(
1078
- x : #IConvertible seq ,
1079
- y : #IConvertible seq ,
1080
- [<Optional; DefaultParameterValue( null ) >] ? Base : IConvertible ,
1081
- [<Optional; DefaultParameterValue( null ) >] ? Width : float ,
1082
- [<Optional; DefaultParameterValue( null ) >] ? Measure : StyleParam.WaterfallMeasure seq ,
1083
- [<Optional; DefaultParameterValue( null ) >] ? Orientation : StyleParam.Orientation ,
1084
- [<Optional; DefaultParameterValue( null ) >] ? Connector : WaterfallConnector ,
1085
- [<Optional; DefaultParameterValue( null ) >] ? AlignmentGroup : string ,
1086
- [<Optional; DefaultParameterValue( null ) >] ? OffsetGroup : string ,
1087
- [<Optional; DefaultParameterValue( null ) >] ? Offset ,
1088
- [<Optional; DefaultParameterValue( true ) >] ? UseDefaults : bool
1056
+ x : seq < #IConvertible >,
1057
+ y : seq < #IConvertible >,
1058
+ [<Optional; DefaultParameterValue( null ) >] ? Name : string ,
1059
+ [<Optional; DefaultParameterValue( null ) >] ? ShowLegend : bool ,
1060
+ [<Optional; DefaultParameterValue( null ) >] ? IncreasingColor : Color ,
1061
+ [<Optional; DefaultParameterValue( null ) >] ? Increasing : FinanceMarker ,
1062
+ [<Optional; DefaultParameterValue( null ) >] ? DecreasingColor : Color ,
1063
+ [<Optional; DefaultParameterValue( null ) >] ? Decreasing : FinanceMarker ,
1064
+ [<Optional; DefaultParameterValue( null ) >] ? TotalsColor : Color ,
1065
+ [<Optional; DefaultParameterValue( null ) >] ? Totals : FinanceMarker ,
1066
+ [<Optional; DefaultParameterValue( null ) >] ? Base : float ,
1067
+ [<Optional; DefaultParameterValue( null ) >] ? Width : float ,
1068
+ [<Optional; DefaultParameterValue( null ) >] ? MultiWidth : seq < float >,
1069
+ [<Optional; DefaultParameterValue( null ) >] ? Opacity : float ,
1070
+ [<Optional; DefaultParameterValue( null ) >] ? Text : #IConvertible ,
1071
+ [<Optional; DefaultParameterValue( null ) >] ? MultiText : seq < #IConvertible >,
1072
+ [<Optional; DefaultParameterValue( null ) >] ? TextPosition : StyleParam.TextPosition ,
1073
+ [<Optional; DefaultParameterValue( null ) >] ? MultiTextPosition : seq < StyleParam.TextPosition >,
1074
+ [<Optional; DefaultParameterValue( null ) >] ? TextFont : Font ,
1075
+ [<Optional; DefaultParameterValue( null ) >] ? Marker : Marker ,
1076
+ [<Optional; DefaultParameterValue( null ) >] ? Connector : WaterfallConnector ,
1077
+ [<Optional; DefaultParameterValue( null ) >] ? Measure : StyleParam.WaterfallMeasure seq ,
1078
+ [<Optional; DefaultParameterValue( null ) >] ? AlignmentGroup : string ,
1079
+ [<Optional; DefaultParameterValue( null ) >] ? OffsetGroup : string ,
1080
+ [<Optional; DefaultParameterValue( true ) >] ? UseDefaults : bool
1089
1081
) =
1090
1082
1091
1083
let useDefaults = defaultArg UseDefaults true
1092
1084
1085
+ let increasing = Increasing |> Option.defaultValue ( FinanceMarker.init()) |> FinanceMarker.style( ?MarkerColor = IncreasingColor)
1086
+ let decreasing = Decreasing |> Option.defaultValue ( FinanceMarker.init()) |> FinanceMarker.style( ?MarkerColor = DecreasingColor)
1087
+ let totals = Totals |> Option.defaultValue ( FinanceMarker.init()) |> FinanceMarker.style( ?MarkerColor = TotalsColor)
1088
+
1093
1089
Trace2D.initWaterfall(
1094
- Trace2DStyle.Waterfall( x, y,
1095
- ?Base = Base ,
1096
- ?Width = Width ,
1097
- ?Measure = Measure ,
1098
- ?Orientation = Orientation ,
1099
- ?Connector = Connector ,
1100
- ?AlignmentGroup = AlignmentGroup,
1101
- ?OffsetGroup = OffsetGroup ,
1102
- ?Offset = Offset
1090
+ Trace2DStyle.Waterfall(
1091
+ X = x,
1092
+ Y = y,
1093
+ ?Name = Name ,
1094
+ ?ShowLegend = ShowLegend ,
1095
+ Increasing = increasing ,
1096
+ Decreasing = decreasing ,
1097
+ Totals = totals ,
1098
+ ?Base = Base ,
1099
+ ?Width = Width ,
1100
+ ?MultiWidth = MultiWidth ,
1101
+ ?Opacity = Opacity ,
1102
+ ?Text = Text ,
1103
+ ?MultiText = MultiText ,
1104
+ ?TextPosition = TextPosition ,
1105
+ ?MultiTextPosition = MultiTextPosition ,
1106
+ ?TextFont = TextFont ,
1107
+ ?Connector = Connector ,
1108
+ ?Measure = Measure ,
1109
+ ?AlignmentGroup = AlignmentGroup ,
1110
+ ?OffsetGroup = OffsetGroup
1103
1111
)
1104
1112
)
1105
1113
|> GenericChart.ofTraceObject useDefaults
1106
1114
1107
1115
1108
1116
/// Creates a waterfall chart. Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values
1109
- ///
1110
- /// Parameters:
1111
- ///
1112
- /// xyMeasures : triple sequence containing x coordinates, y coordinates, and the type of measure used for each bar.
1113
- ///
1114
- /// Base : Sets where the bar base is drawn (in position axis units).
1115
- ///
1116
- /// Width : Sets the bar width (in position axis units).
1117
- ///
1118
- /// Orientation : Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal).
1119
- ///
1120
- /// Connector : Sets the styling of the connector lines
1121
- ///
1122
- /// AlignmentGroup : Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
1123
- ///
1124
- /// OffsetGroup : Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
1125
- ///
1126
- /// Offset : Shifts the position where the bar is drawn (in position axis units). In "group" barmode, traces that set "offset" will be excluded and drawn in "overlay" mode instead.
1127
1117
[<Extension>]
1128
1118
static member Waterfall
1129
1119
(
1130
- xyMeasure : ( #IConvertible * #IConvertible * StyleParam.WaterfallMeasure ) seq ,
1131
- [<Optional; DefaultParameterValue( null ) >] ? Base : IConvertible ,
1132
- [<Optional; DefaultParameterValue( null ) >] ? Width : float ,
1133
- [<Optional; DefaultParameterValue( null ) >] ? Orientation : StyleParam.Orientation ,
1134
- [<Optional; DefaultParameterValue( null ) >] ? Connector : WaterfallConnector ,
1135
- [<Optional; DefaultParameterValue( null ) >] ? AlignmentGroup : string ,
1136
- [<Optional; DefaultParameterValue( null ) >] ? OffsetGroup : string ,
1137
- [<Optional; DefaultParameterValue( null ) >] ? Offset ,
1138
- [<Optional; DefaultParameterValue( true ) >] ? UseDefaults : bool
1120
+ xy : seq < #IConvertible * #IConvertible >,
1121
+ [<Optional; DefaultParameterValue( null ) >] ? Name : string ,
1122
+ [<Optional; DefaultParameterValue( null ) >] ? ShowLegend : bool ,
1123
+ [<Optional; DefaultParameterValue( null ) >] ? IncreasingColor : Color ,
1124
+ [<Optional; DefaultParameterValue( null ) >] ? Increasing : FinanceMarker ,
1125
+ [<Optional; DefaultParameterValue( null ) >] ? DecreasingColor : Color ,
1126
+ [<Optional; DefaultParameterValue( null ) >] ? Decreasing : FinanceMarker ,
1127
+ [<Optional; DefaultParameterValue( null ) >] ? TotalsColor : Color ,
1128
+ [<Optional; DefaultParameterValue( null ) >] ? Totals : FinanceMarker ,
1129
+ [<Optional; DefaultParameterValue( null ) >] ? Base : float ,
1130
+ [<Optional; DefaultParameterValue( null ) >] ? Width : float ,
1131
+ [<Optional; DefaultParameterValue( null ) >] ? MultiWidth : seq < float >,
1132
+ [<Optional; DefaultParameterValue( null ) >] ? Opacity : float ,
1133
+ [<Optional; DefaultParameterValue( null ) >] ? Text : #IConvertible ,
1134
+ [<Optional; DefaultParameterValue( null ) >] ? MultiText : seq < #IConvertible >,
1135
+ [<Optional; DefaultParameterValue( null ) >] ? TextPosition : StyleParam.TextPosition ,
1136
+ [<Optional; DefaultParameterValue( null ) >] ? MultiTextPosition : seq < StyleParam.TextPosition >,
1137
+ [<Optional; DefaultParameterValue( null ) >] ? TextFont : Font ,
1138
+ [<Optional; DefaultParameterValue( null ) >] ? Marker : Marker ,
1139
+ [<Optional; DefaultParameterValue( null ) >] ? Connector : WaterfallConnector ,
1140
+ [<Optional; DefaultParameterValue( null ) >] ? Measure : StyleParam.WaterfallMeasure seq ,
1141
+ [<Optional; DefaultParameterValue( null ) >] ? AlignmentGroup : string ,
1142
+ [<Optional; DefaultParameterValue( null ) >] ? OffsetGroup : string ,
1143
+ [<Optional; DefaultParameterValue( true ) >] ? UseDefaults : bool
1139
1144
) =
1140
1145
1141
- let useDefaults = defaultArg UseDefaults true
1146
+ let x , y = Seq.unzip xy
1142
1147
1143
- let x , y , measure = Seq.unzip3 xyMeasure
1144
- Trace2D.initWaterfall(
1145
- Trace2DStyle.Waterfall( x, y,
1146
- ?Base = Base ,
1147
- ?Width = Width ,
1148
- ?Measure = Some measure ,
1149
- ?Orientation = Orientation ,
1150
- ?Connector = Connector ,
1151
- ?AlignmentGroup = AlignmentGroup,
1152
- ?OffsetGroup = OffsetGroup ,
1153
- ?Offset = Offset
1154
- )
1148
+ Chart.Waterfall(
1149
+ x, y,
1150
+ ?Name = Name ,
1151
+ ?ShowLegend = ShowLegend ,
1152
+ ?IncreasingColor = IncreasingColor ,
1153
+ ?Increasing = Increasing ,
1154
+ ?DecreasingColor = DecreasingColor ,
1155
+ ?Decreasing = Decreasing ,
1156
+ ?TotalsColor = TotalsColor ,
1157
+ ?Totals = Totals ,
1158
+ ?Base = Base ,
1159
+ ?Width = Width ,
1160
+ ?MultiWidth = MultiWidth ,
1161
+ ?Opacity = Opacity ,
1162
+ ?Text = Text ,
1163
+ ?MultiText = MultiText ,
1164
+ ?TextPosition = TextPosition ,
1165
+ ?MultiTextPosition= MultiTextPosition,
1166
+ ?TextFont = TextFont ,
1167
+ ?Marker = Marker ,
1168
+ ?Connector = Connector ,
1169
+ ?Measure = Measure ,
1170
+ ?AlignmentGroup = AlignmentGroup ,
1171
+ ?OffsetGroup = OffsetGroup ,
1172
+ ?UseDefaults = UseDefaults
1173
+ )
1174
+
1175
+ /// Creates a waterfall chart. Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values
1176
+ [<Extension>]
1177
+ static member Waterfall
1178
+ (
1179
+ xymeasures : seq < #IConvertible * #IConvertible * StyleParam.WaterfallMeasure >,
1180
+ [<Optional; DefaultParameterValue( null ) >] ? Name : string ,
1181
+ [<Optional; DefaultParameterValue( null ) >] ? ShowLegend : bool ,
1182
+ [<Optional; DefaultParameterValue( null ) >] ? IncreasingColor : Color ,
1183
+ [<Optional; DefaultParameterValue( null ) >] ? Increasing : FinanceMarker ,
1184
+ [<Optional; DefaultParameterValue( null ) >] ? DecreasingColor : Color ,
1185
+ [<Optional; DefaultParameterValue( null ) >] ? Decreasing : FinanceMarker ,
1186
+ [<Optional; DefaultParameterValue( null ) >] ? TotalsColor : Color ,
1187
+ [<Optional; DefaultParameterValue( null ) >] ? Totals : FinanceMarker ,
1188
+ [<Optional; DefaultParameterValue( null ) >] ? Base : float ,
1189
+ [<Optional; DefaultParameterValue( null ) >] ? Width : float ,
1190
+ [<Optional; DefaultParameterValue( null ) >] ? MultiWidth : seq < float >,
1191
+ [<Optional; DefaultParameterValue( null ) >] ? Opacity : float ,
1192
+ [<Optional; DefaultParameterValue( null ) >] ? Text : #IConvertible ,
1193
+ [<Optional; DefaultParameterValue( null ) >] ? MultiText : seq < #IConvertible >,
1194
+ [<Optional; DefaultParameterValue( null ) >] ? TextPosition : StyleParam.TextPosition ,
1195
+ [<Optional; DefaultParameterValue( null ) >] ? MultiTextPosition : seq < StyleParam.TextPosition >,
1196
+ [<Optional; DefaultParameterValue( null ) >] ? TextFont : Font ,
1197
+ [<Optional; DefaultParameterValue( null ) >] ? Marker : Marker ,
1198
+ [<Optional; DefaultParameterValue( null ) >] ? Connector : WaterfallConnector ,
1199
+ [<Optional; DefaultParameterValue( null ) >] ? AlignmentGroup : string ,
1200
+ [<Optional; DefaultParameterValue( null ) >] ? OffsetGroup : string ,
1201
+ [<Optional; DefaultParameterValue( true ) >] ? UseDefaults : bool
1202
+ ) =
1203
+
1204
+ let x , y , measure = Seq.unzip3 xymeasures
1205
+
1206
+ Chart.Waterfall(
1207
+ x, y,
1208
+ ?Name = Name ,
1209
+ ?ShowLegend = ShowLegend ,
1210
+ ?IncreasingColor = IncreasingColor ,
1211
+ ?Increasing = Increasing ,
1212
+ ?DecreasingColor = DecreasingColor ,
1213
+ ?Decreasing = Decreasing ,
1214
+ ?TotalsColor = TotalsColor ,
1215
+ ?Totals = Totals ,
1216
+ ?Base = Base ,
1217
+ ?Width = Width ,
1218
+ ?MultiWidth = MultiWidth ,
1219
+ ?Opacity = Opacity ,
1220
+ ?Text = Text ,
1221
+ ?MultiText = MultiText ,
1222
+ ?TextPosition = TextPosition ,
1223
+ ?MultiTextPosition= MultiTextPosition,
1224
+ ?TextFont = TextFont ,
1225
+ ?Marker = Marker ,
1226
+ ?Connector = Connector ,
1227
+ Measure = measure ,
1228
+ ?AlignmentGroup = AlignmentGroup ,
1229
+ ?OffsetGroup = OffsetGroup ,
1230
+ ?UseDefaults = UseDefaults
1155
1231
)
1156
- |> GenericChart.ofTraceObject useDefaults
1157
1232
1158
1233
/// Illustrates comparisons among individual items
1159
1234
[<Extension>]
0 commit comments