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
/// Creates a treemap chart. Treemap charts visualize hierarchical data using nested rectangles. Same as Sunburst the hierarchy is defined by labels and parents attributes. Click on one sector to zoom in/out, which also displays a pathbar in the upper-left corner of your treemap. To zoom out you can use the path bar as well.
1322
+
///
1323
+
/// Parameters:
1324
+
///
1325
+
/// labels: Sets the labels of each of the sectors.
1326
+
///
1327
+
/// parents: Sets the parent sectors for each of the sectors. Empty string items '' are understood to reference the root node in the hierarchy. If `ids` is filled, `parents` items are understood to be "ids" themselves. When `ids` is not set, plotly attempts to find matching items in `labels`, but beware they must be unique.
1328
+
///
1329
+
/// Ids: Assigns id labels to each datum. These ids for object constancy of data points during animation.
1330
+
///
1331
+
/// Values: Sets the values associated with each of the sectors. Use with `branchvalues` to determine how the values are summed.
1332
+
///
1333
+
/// Text: Sets text elements associated with each sector. If trace `textinfo` contains a "text" flag, these elements will be seen on the chart. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels.
1334
+
///
1335
+
/// Branchvalues: Determines how the items in `values` are summed. When set to "total", items in `values` are taken to be value of all its descendants. When set to "remainder", items in `values` corresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.
1336
+
///
1337
+
/// Level: Sets the level from which this trace hierarchy is rendered. Set `level` to `''` to start from the root node in the hierarchy. Must be an "id" if `ids` is filled in, otherwise plotly attempts to find a matching item in `labels`.
1338
+
///
1339
+
/// Maxdepth: Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy.
1340
+
///
1341
+
/// Colorbar: Sets the Colorbar for the chart
1342
+
///
1343
+
///Colors: Sets the color of each sector of this trace. If not specified, the default trace color set is used to pick the sector colors.
Copy file name to clipboardExpand all lines: src/FSharp.Plotly/Trace.fs
+52-1Lines changed: 52 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1210,4 +1210,55 @@ module Trace =
1210
1210
Level |> DynObj.setValueOpt trace "level"
1211
1211
Maxdepth |> DynObj.setValueOpt trace "maxdepth"
1212
1212
trace
1213
-
)
1213
+
)
1214
+
1215
+
/// Applies the styles of treemap plot to TraceObjects
1216
+
///
1217
+
/// Parameters:
1218
+
///
1219
+
/// labels : Sets the labels of each of the sectors.
1220
+
///
1221
+
/// parents : Sets the parent sectors for each of the sectors. Empty string items '' are understood to reference the root node in the hierarchy. If `ids` is filled, `parents` items are understood to be "ids" themselves. When `ids` is not set, plotly attempts to find matching items in `labels`, but beware they must be unique.
1222
+
///
1223
+
/// Ids : Assigns id labels to each datum. These ids for object constancy of data points during animation.
1224
+
///
1225
+
/// Values : Sets the values associated with each of the sectors. Use with `branchvalues` to determine how the values are summed.
1226
+
///
1227
+
/// Text : Sets text elements associated with each sector. If trace `textinfo` contains a "text" flag, these elements will be seen on the chart. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels.
1228
+
///
1229
+
/// Branchvalues: Determines how the items in `values` are summed. When set to "total", items in `values` are taken to be value of all its descendants. When set to "remainder", items in `values` corresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.
1230
+
///
1231
+
/// Tiling : Sets Tiling algorithm options
1232
+
///
1233
+
/// PathBar : Sets the Pathbar used to navigate zooming
1234
+
///
1235
+
/// Level : Sets the level from which this trace hierarchy is rendered. Set `level` to `''` to start from the root node in the hierarchy. Must be an "id" if `ids` is filled in, otherwise plotly attempts to find a matching item in `labels`.
1236
+
///
1237
+
/// Maxdepth : Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy.
///Initializes tiling object (used in Chart.Treemap)
9
+
///
10
+
///Parameters:
11
+
///
12
+
///Packing : Determines d3 treemap solver. For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling
13
+
///
14
+
///SquarifyRatio: When using "squarify" `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/master/README.md#squarify_ratio this option specifies the desired aspect ratio of the generated rectangles. The ratio must be specified as a number greater than or equal to one. Note that the orientation of the generated rectangles (tall or wide) is not implied by the ratio; for example, a ratio of two will attempt to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2. When using "squarify", unlike d3 which uses the Golden Ratio i.e. 1.618034, Plotly applies 1 to increase squares in treemap layouts.
15
+
///
16
+
///Flip : Determines if the positions obtained from solver are flipped on each axis.
17
+
///
18
+
///Pad : Sets the inner padding (in px).
19
+
static memberinit
20
+
(
21
+
?Packing :StyleParam.TreemapTilingPacking,
22
+
?SquarifyRatio :float,
23
+
?Flip :string,
24
+
?Pad :float
25
+
)=
26
+
27
+
TreemapTiling()
28
+
|> TreemapTiling.style
29
+
(
30
+
?Packing = Packing ,
31
+
?SquarifyRatio = SquarifyRatio,
32
+
?Flip = Flip ,
33
+
?Pad = Pad
34
+
)
35
+
36
+
///Applies the given styles to the given tiling object
37
+
///
38
+
///Parameters:
39
+
///
40
+
///Packing : Determines d3 treemap solver. For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling
41
+
///
42
+
///SquarifyRatio: When using "squarify" `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/master/README.md#squarify_ratio this option specifies the desired aspect ratio of the generated rectangles. The ratio must be specified as a number greater than or equal to one. Note that the orientation of the generated rectangles (tall or wide) is not implied by the ratio; for example, a ratio of two will attempt to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2. When using "squarify", unlike d3 which uses the Golden Ratio i.e. 1.618034, Plotly applies 1 to increase squares in treemap layouts.
43
+
///
44
+
///Flip : Determines if the positions obtained from solver are flipped on each axis.
0 commit comments