@@ -32,6 +32,7 @@ This is the official user manual (English edition) for **mdbook-plotly**, a prep
3232 - [ Sankey Diagrams] ( #data-sankey )
3333 - [ Geographic Scatter Plots] ( #data-scatter_geo )
3434 - [ Mapbox Scatter Plots] ( #data-scatter_mapbox )
35+ - [ Polar Scatter Plots] ( #data-scatter_polar )
3536 - [ Mapbox Density Heatmaps] ( #data-density_mapbox )
3637 - [ Tables] ( #data-table )
3738 - [ SandBoxScript (Deprecated)] ( #sand-box-script )
@@ -189,10 +190,9 @@ The following notation is used throughout this reference to describe expected ty
189190- ** Rgb** – ` " rgb(u8, u8, u8)" ` (e.g., ` " rgb(0, 0, 0)" ` )
190191- ** Rgba** – ` " rgba(u8, u8, u8, f64)" ` (e.g., ` " rgba(0, 0, 0, 0.0)" ` )
191192- ** Color** – can be one of the following:
192- - A named CSS color: ` { named_color: " aliceblue" }`
193- - An RGB color: ` { rgb_color: " rgb(255, 0, 0)" }`
194- - An RGBA color: ` { rgba_color: " rgba(255, 0, 0, 0.5)" }`
195- - Alternatively, for RGB and RGBA, you can use the plain string forms ` " rgb(255,0,0)" ` or ` " rgba(255,0,0,0.5)" ` directly.
193+ - A named CSS color: ` " aliceblue" `
194+ - An RGB color: ` " rgb(255, 0, 0)" `
195+ - An RGBA color: ` " rgba(255, 0, 0, 0.5)" `
196196
197197# ## Map and Generators
198198
@@ -497,6 +497,10 @@ layout: {
497497 plot_background_color? : Color,
498498 // Separators
499499 separators? : String,
500+ // Whether to enable automatic size adjustment (default true)
501+ auto_size? : bool,
502+ // Paper background colour (distinct from plot_background_color)
503+ paper_background_color? : Color,
500504
501505 // Legend configuration
502506 legend? : {
@@ -514,6 +518,38 @@ layout: {
514518 trace_group_gap? : usize,
515519 // Title
516520 title? : String,
521+ // Width of each legend item (pixels)
522+ item_width? : usize,
523+
524+ // Trace display order within the legend
525+ // " normal" : natural order
526+ // " reversed" : reversed order
527+ // " grouped" : grouped by trace group
528+ // " reversed+grouped" : reversed and grouped
529+ trace_order? : " normal" | " reversed" | " grouped" | " reversed+grouped" ,
530+
531+ // Legend item sizing mode
532+ // " trace" : sized per trace
533+ // " constant" : constant width
534+ item_sizing? : " trace" | " constant" ,
535+
536+ // Single-click behaviour on legend items
537+ // " toggle" : toggle the trace
538+ // " toggleothers" : toggle all other traces
539+ // " false" : no action
540+ item_click? : " toggle" | " toggleothers" | " false" ,
541+
542+ // Double-click behaviour on legend items (same values as item_click)
543+ item_double_click? : " toggle" | " toggleothers" | " false" ,
544+
545+ // Vertical alignment of legend text
546+ // " top" , " middle" , " bottom"
547+ valign? : " top" | " middle" | " bottom" ,
548+
549+ // Click behaviour on legend groups
550+ // " toggleitem" : toggle all items in the group
551+ // " togglegroup" : toggle the group
552+ group_click? : " toggleitem" | " togglegroup" ,
517553 },
518554
519555 // Chart margin configuration
@@ -549,9 +585,6 @@ config: {
549585 editable? : bool,
550586 // Whether auto-sizing is enabled
551587 autosizable? : bool,
552- // Whether to resize the layout when the window is resized
553- // WARNING: This option currently has no practical effect.
554- responsive? : bool,
555588 // Whether to fill the screen
556589 // NOTE: Only effective when ` autosizable` is ` true` .
557590 fill_frame? : bool,
@@ -583,6 +616,22 @@ config: {
583616 display_logo? : bool,
584617 // Watermark the image with a company logo
585618 watermark? : bool,
619+
620+ // Controls when the modebar appears
621+ // " hover" : only show on hover
622+ // " true" : always show (default)
623+ // " false" : never show
624+ display_mode_bar? : " hover" | " true" | " false" ,
625+
626+ // Double-click behaviour
627+ // " false" : no action
628+ // " reset" : reset the chart view
629+ // " autosize" : autosize
630+ // " reset+autosize" : reset and autosize
631+ double_click? : " false" | " reset" | " autosize" | " reset+autosize" ,
632+
633+ // Whether to show an " Edit in Chart Studio" link (alias for show_link)
634+ show_edit_in_chart_studio? : bool,
586635}
587636` ` `
588637
@@ -1127,6 +1176,78 @@ config: {
11271176}
11281177```
11291178
1179+ ### Data-scatter_polar
1180+
1181+ `scatter_polar` can be a `Data` entry. This `Data` will be rendered as a scatter plot in polar coordinates.
1182+
1183+ ```json5
1184+ {
1185+ type: "scatter_polar",
1186+
1187+ // Angular coordinates (degrees unless layout.polar.angularaxis.thetaunit is overridden)
1188+ theta: [f64; usize],
1189+ // Radial coordinates
1190+ r: [f64; usize],
1191+
1192+ // Trace name, displayed in legend and hover info
1193+ name?: String,
1194+ // Whether to show this trace in the legend
1195+ show_legend?: bool,
1196+ // Legend group identifier
1197+ legend_group?: String,
1198+ // Opacity, from 0 (transparent) to 1 (opaque)
1199+ opacity?: f64,
1200+ // Uniform text displayed on data points
1201+ text?: String,
1202+ // Per-point text
1203+ text_array?: [String; usize],
1204+ // Uniform hover text
1205+ hover_text?: String,
1206+ // Per-point hover text
1207+ hover_text_array?: [String; usize],
1208+ // Hover label template
1209+ hover_template?: String,
1210+ // Per-point hover template
1211+ hover_template_array?: [String; usize],
1212+ // Polar subplot to use (e.g. "polar", "polar2")
1213+ subplot?: String,
1214+ // Whether to connect gaps between missing data points
1215+ connect_gaps?: bool,
1216+ // Reference start value for radial coordinates (used to map array indices to radial distance)
1217+ r0?: f64,
1218+ // Radial step (used with r0)
1219+ dr?: f64,
1220+ // Reference start value for angular coordinates (degrees)
1221+ theta0?: f64,
1222+ // Angular step (degrees)
1223+ dtheta?: f64,
1224+ // Fill style
1225+ // "tozeroy": fill to r=0
1226+ // "tozerox": fill to theta=0
1227+ // "tonexty": fill to next trace' s r values
1228+ // " tonextx" : fill to next trace' s theta values
1229+ // "toself": fill enclosed area
1230+ // "tonext": fill to next trace
1231+ // "none": no fill
1232+ fill?: "tozeroy" | "tozerox" | "tonexty" | "tonextx" | "toself" | "tonext" | "none",
1233+ // Drawing mode
1234+ // "lines": lines only
1235+ // "markers": markers only
1236+ // "text": text only
1237+ // "linesmarkers": lines + markers
1238+ // "linestext": lines + text
1239+ // "markerstext": markers + text
1240+ // "linemarkerstext": lines + markers + text
1241+ // "none": hidden
1242+ mode?: "lines" | "markers" | "text" | "linesmarkers" | "linestext" | "markerstext" | "linemarkerstext" | "none",
1243+ // Visibility control
1244+ // "true": visible (default)
1245+ // "false": hidden
1246+ // "legendonly": not drawn but shown in legend
1247+ visible?: "true" | "false" | "legendonly",
1248+ }
1249+ ```
1250+
11301251### Data-scatter
11311252
11321253`scatter` can be a `Data` entry. This `Data` will be rendered as a filled area chart.
0 commit comments