@@ -1082,6 +1082,13 @@ type Chart =
10821082 ?Scalegroup= Scalegroup,? Scalemode= Scalemode,? Side= Side,? Span= Span,? SpanMode= SpanMode,? Uirevision= Uirevision
10831083 )
10841084
1085+ static member private renderHeatmapTrace ( useWebGL : bool ) ( style : Trace -> Trace ) =
1086+ if useWebGL then
1087+ Trace.initHeatmapGL style
1088+ |> GenericChart.ofTraceObject
1089+ else
1090+ Trace.initHeatmap style
1091+ |> GenericChart.ofTraceObject
10851092
10861093 /// Shows a graphical representation of a 3-dimensional surface by plotting constant z slices, called contours, on a 2-dimensional format.
10871094 /// That is, given a value for z, lines are drawn for connecting the (x,y) coordinates where that z value occurs.
@@ -1096,11 +1103,17 @@ type Chart =
10961103 [<Optional; DefaultParameterValue( null ) >] ? Xgap ,
10971104 [<Optional; DefaultParameterValue( null ) >] ? Ygap ,
10981105 [<Optional; DefaultParameterValue( null ) >] ? zSmooth ,
1099- [<Optional; DefaultParameterValue( null ) >] ? Colorbar ) =
1100- Trace.initHeatmap ( TraceStyle.Heatmap( Z= data,? X= ColNames, ?Y= RowNames,
1101- ?Xgap= Xgap,? Ygap= Ygap,? Colorscale= Colorscale,? Showscale= Showscale,? zSmooth= zSmooth,? Colorbar= Colorbar) )
1102- |> TraceStyle.TraceInfo( ?Name= Name,? Showlegend= Showlegend,? Opacity= Opacity)
1103- |> GenericChart.ofTraceObject
1106+ [<Optional; DefaultParameterValue( null ) >] ? Colorbar ,
1107+ [<Optional; DefaultParameterValue( false ) >] ? UseWebGL : bool )
1108+ =
1109+ let style =
1110+ TraceStyle.Heatmap( Z= data,? X= ColNames, ?Y= RowNames,
1111+ ?Xgap= Xgap,? Ygap= Ygap,? Colorscale= Colorscale,? Showscale= Showscale,? zSmooth= zSmooth,? Colorbar= Colorbar)
1112+ >> TraceStyle.TraceInfo( ?Name= Name,? Showlegend= Showlegend,? Opacity= Opacity)
1113+
1114+ let useWebGL = defaultArg UseWebGL false
1115+
1116+ Chart.renderHeatmapTrace useWebGL style
11041117
11051118
11061119 /// Shows a graphical representation of data where the individual values contained in a matrix are represented as colors.
0 commit comments