You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|> Seq.mapi (fun i ((xAxis,yAxis),((y,x),gChart))->
1087
-
1088
-
letxAnchor,yAnchor =
1089
-
if hasSharedAxes then
1090
-
x, y //set axis anchors according to grid coordinates
1091
-
else
1092
-
i+1, i+1//set individual axis anchors for each subplot
1093
-
1094
-
gChart
1095
-
|> Chart.withAxisAnchor(xAnchor,yAnchor)// set adapted axis anchors
1096
-
|> Chart.withXAxis(xAxis,(StyleParam.SubPlotId.XAxis (i+1)))// set previous axis with adapted id (one individual axis for each subplot, wether or not they will be used later)
1097
-
|> Chart.withYAxis(yAxis,(StyleParam.SubPlotId.YAxis (i+1)))// set previous axis with adapted id (one individual axis for each subplot, wether or not they will be used later)
1098
-
|> GenericChart.mapLayout (fun l ->
1099
-
if i >0then
1100
-
// remove default axes from consecutive charts, otherwise they will override the first one
1101
-
l.Remove("xaxis")|> ignore
1102
-
l.Remove("yaxis")|> ignore
1103
-
l
1104
-
)
1081
+
|> Seq.mapi (fun i ((rowIndex,colIndex),gChart)->
1082
+
1083
+
letlayout= gChart |> GenericChart.getLayout
1084
+
1085
+
match TraceID.ofTraces (gChart |> GenericChart.getTraces)with
1086
+
| TraceID.Multi -> failwith $"the trace for ({rowIndex},{colIndex}) contains multiple different subplot types. this is not supported."
colIndex, rowIndex //set axis anchors according to grid coordinates
1095
+
else
1096
+
i+1, i+1
1097
+
1098
+
gChart
1099
+
|> Chart.withAxisAnchor(xAnchor,yAnchor)// set adapted axis anchors
1100
+
|> Chart.withXAxis(xAxis,(StyleParam.SubPlotId.XAxis (i+1)))// set previous axis with adapted id (one individual axis for each subplot, wether or not they will be used later)
1101
+
|> Chart.withYAxis(yAxis,(StyleParam.SubPlotId.YAxis (i+1)))// set previous axis with adapted id (one individual axis for each subplot, wether or not they will be used later)
1102
+
|> GenericChart.mapLayout (fun l ->
1103
+
if i >0then
1104
+
// remove default axes from consecutive charts, otherwise they will override the first one
| MultiChart (traces, layout, config, displayOpts)-> MultiChart (traces,layout,config, f displayOpts)
411
411
412
-
412
+
/// returns a single TraceID (when all traces of the charts are of the same type), or traceID.Multi if the chart contains traces of multiple different types
0 commit comments