From b4988fca06cb07780a201a633a25139211efa52b Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Wed, 15 Apr 2026 23:19:42 +0200 Subject: [PATCH 1/3] Update encoded array plan with H1/H2 completion state Records the full set of trace-level and chart-level commits, marks phases H1 and H2 as complete, and points to H3 (C# surface) as the next planned phase. Co-Authored-By: Claude Opus 4.6 --- plans/EncodedArraySupport.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/plans/EncodedArraySupport.md b/plans/EncodedArraySupport.md index 29344a73..512e6a6c 100644 --- a/plans/EncodedArraySupport.md +++ b/plans/EncodedArraySupport.md @@ -271,8 +271,10 @@ Implemented so far: - Trace3D encoded support - subplot trace-family support for polar, geo, mapbox, ternary, and smith traces - carpet and domain trace-family support +- top-level `Chart` API encoded overloads for every foundational chart root (phase H1) +- top-level `Chart` API encoded overloads for derived convenience helpers (phase H2) -Committed so far: +Trace-level commits: - `62a96500` `Bump bundled plotly.js to 2.28.0` - `43ff9869` `Complete encoded scatter fields and error arrays` @@ -283,20 +285,34 @@ Committed so far: - `81bd99fd` `Add encoded subplot trace fields (part 1)` - `8a9fcb64` `Add encoded carpet and domain trace fields` +Top-level Chart API commits: + +- `37006fd9` `Add encoded Chart.Scatter root support` (H1-A prototype, superseded by reset design) +- `5edcbb17` `Add encoded scatter-derived helper support` (H1-B prototype, superseded by reset design) +- `b5767af5` `Add encoded scatter-derived chart overloads` (H1-B, reset design) +- `02df1fad` `Add encoded Waterfall width support` (H1-C support fix) +- `4913748a` `Add encoded distribution and finance chart roots` (H1-D) +- `ed86f94d` `Add encoded Dimension values and Chart.Splom root support` (H1-D-Splom) +- `62e9161c` `Add encoded matrix chart root overloads` (H1-E) +- `045a2b63` `Add encoded 3D chart root overloads` (H1-F) +- `1d8e9e54` `Add encoded subplot and domain chart roots` (H1-G part 1) +- `73965294` `Add remaining encoded chart roots` (H1-G part 2) +- `c9446e58` `Add encoded derived convenience chart overloads` (H2) + Implemented but not yet committed: -- none for the trace-level rollout +- none -Next planned action: +Current stage: -- plan and implement top-level `Chart` API support for encoded arrays +- phase H1 (foundational chart roots) and phase H2 (derived convenience helpers) are complete and committed +- next planned phase is H3 (C# surface projection in `Plotly.NET.CSharp`) Latest verification result: - `.\build.cmd runTestsCore` -- `802` tests passed +- `933` tests passed - `Plotly.NET` builds successfully -- current committed `Commit G1` work introduces temporary F# XML-doc warnings for newly added encoded parameters ## Next Phase: Top-Level Chart API Support From a347937e4566ed3151b21a6f7abc895088b526e6 Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Thu, 16 Apr 2026 11:39:14 +0200 Subject: [PATCH 2/3] #500: split chart api into separate files --- plans/ChartAPIFileSplit.md | 320 + src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs | 62 +- src/Plotly.NET.CSharp/ChartAPI/Chart3D.cs | 23 +- src/Plotly.NET.CSharp/ChartAPI/ChartCarpet.cs | 17 +- src/Plotly.NET.CSharp/ChartAPI/ChartDomain.cs | 25 +- src/Plotly.NET.CSharp/ChartAPI/ChartMap.cs | 25 +- src/Plotly.NET.CSharp/ChartAPI/ChartPolar.cs | 15 +- src/Plotly.NET.CSharp/ChartAPI/ChartSmith.cs | 11 +- .../ChartAPI/ChartTernary.cs | 11 +- src/Plotly.NET.ImageExport/Playground.fsx | 35 +- src/Plotly.NET/ChartAPI/Chart2D.fs | 9234 ----------------- .../ChartAPI/Chart2D/Chart2D_Area.fs | 979 ++ .../ChartAPI/Chart2D/Chart2D_Bar.fs | 921 ++ .../ChartAPI/Chart2D/Chart2D_Distribution.fs | 866 ++ .../ChartAPI/Chart2D/Chart2D_Finance.fs | 618 ++ .../ChartAPI/Chart2D/Chart2D_Funnel.fs | 733 ++ .../ChartAPI/Chart2D/Chart2D_Heatmap.fs | 816 ++ .../ChartAPI/Chart2D/Chart2D_Histogram.fs | 979 ++ .../ChartAPI/Chart2D/Chart2D_Scatter.fs | 2305 ++++ .../ChartAPI/Chart2D/Chart2D_Splom.fs | 478 + .../ChartAPI/Chart2D/Chart2D_Statistical.fs | 623 ++ src/Plotly.NET/ChartAPI/Chart3D.fs | 2482 ----- .../ChartAPI/Chart3D/Chart3D_Scatter.fs | 1177 +++ .../ChartAPI/Chart3D/Chart3D_Surface.fs | 395 + .../ChartAPI/Chart3D/Chart3D_VectorField.fs | 628 ++ .../ChartAPI/Chart3D/Chart3D_Volume.fs | 338 + .../ChartAPI/ChartCarpet/ChartCarpet_Base.fs | 160 + .../ChartCarpet/ChartCarpet_Contour.fs | 308 + .../ChartCarpet_Scatter.fs} | 437 +- src/Plotly.NET/ChartAPI/ChartDomain.fs | 2701 ----- .../ChartDomain/ChartDomain_Hierarchy.fs | 769 ++ .../ChartDomain/ChartDomain_Icicle.fs | 427 + .../ChartAPI/ChartDomain/ChartDomain_Pie.fs | 876 ++ .../ChartDomain/ChartDomain_Relations.fs | 441 + .../ChartAPI/ChartDomain/ChartDomain_Table.fs | 259 + .../ChartAPI/ChartMap/ChartMap_Density.fs | 380 + .../{ChartMap.fs => ChartMap/ChartMap_Geo.fs} | 1426 +-- .../ChartAPI/ChartMap/ChartMap_Mapbox.fs | 1077 ++ .../ChartAPI/ChartPolar/ChartPolar_Bar.fs | 256 + .../ChartPolar_Scatter.fs} | 242 +- .../ChartSmith_Scatter.fs} | 5 +- .../ChartTernary_Scatter.fs} | 5 +- src/Plotly.NET/Playground.fsx | 37 +- src/Plotly.NET/Plotly.NET.fsproj | 41 +- 44 files changed, 17326 insertions(+), 16637 deletions(-) create mode 100644 plans/ChartAPIFileSplit.md delete mode 100644 src/Plotly.NET/ChartAPI/Chart2D.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Area.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Bar.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Distribution.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Finance.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Funnel.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Heatmap.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Histogram.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Scatter.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Splom.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Statistical.fs delete mode 100644 src/Plotly.NET/ChartAPI/Chart3D.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Scatter.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Surface.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart3D/Chart3D_VectorField.fs create mode 100644 src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Volume.fs create mode 100644 src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Base.fs create mode 100644 src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Contour.fs rename src/Plotly.NET/ChartAPI/{ChartCarpet.fs => ChartCarpet/ChartCarpet_Scatter.fs} (69%) delete mode 100644 src/Plotly.NET/ChartAPI/ChartDomain.fs create mode 100644 src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Hierarchy.fs create mode 100644 src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Icicle.fs create mode 100644 src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Pie.fs create mode 100644 src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Relations.fs create mode 100644 src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Table.fs create mode 100644 src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Density.fs rename src/Plotly.NET/ChartAPI/{ChartMap.fs => ChartMap/ChartMap_Geo.fs} (52%) create mode 100644 src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Mapbox.fs create mode 100644 src/Plotly.NET/ChartAPI/ChartPolar/ChartPolar_Bar.fs rename src/Plotly.NET/ChartAPI/{ChartPolar.fs => ChartPolar/ChartPolar_Scatter.fs} (83%) rename src/Plotly.NET/ChartAPI/{ChartSmith.fs => ChartSmith/ChartSmith_Scatter.fs} (99%) rename src/Plotly.NET/ChartAPI/{ChartTernary.fs => ChartTernary/ChartTernary_Scatter.fs} (99%) diff --git a/plans/ChartAPIFileSplit.md b/plans/ChartAPIFileSplit.md new file mode 100644 index 00000000..c504ae81 --- /dev/null +++ b/plans/ChartAPIFileSplit.md @@ -0,0 +1,320 @@ +# Chart API File Split Plan + +## Background + +The per-family files under [src/Plotly.NET/ChartAPI/](src/Plotly.NET/ChartAPI/) have grown unwieldy: + +| File | Lines | +|---|---:| +| [Chart2D.fs](src/Plotly.NET/ChartAPI/Chart2D.fs) | 9234 | +| [Chart.fs](src/Plotly.NET/ChartAPI/Chart.fs) | 3713 | +| [ChartMap.fs](src/Plotly.NET/ChartAPI/ChartMap.fs) | 2930 | +| [ChartDomain.fs](src/Plotly.NET/ChartAPI/ChartDomain.fs) | 2701 | +| [Chart3D.fs](src/Plotly.NET/ChartAPI/Chart3D.fs) | 2482 | +| [ChartCarpet.fs](src/Plotly.NET/ChartAPI/ChartCarpet.fs) | 1765 | +| [ChartPolar.fs](src/Plotly.NET/ChartAPI/ChartPolar.fs) | 1519 | +| [ChartTernary.fs](src/Plotly.NET/ChartAPI/ChartTernary.fs) | 1022 | +| [ChartSmith.fs](src/Plotly.NET/ChartAPI/ChartSmith.fs) | 995 | + +`Chart2D.fs` alone holds ~25 chart-type families (`Scatter`, `Line`, `Point`, `Bubble`, `Bar`, `Histogram`, `BoxPlot`, `Violin`, `Heatmap`, `OHLC`, `Candlestick`, `Splom`, ...), each with 3–4 overloads averaging ~100 lines due primarily to long XML doc blocks and wide optional parameter lists. The tiny internal helpers at the top of the file are not the main source of bloat. + +This matters for the refactor choice: simply offloading implementation bodies into helper modules would slightly reduce per-member complexity, but it would leave the bulk of the 9k-line file intact because the docs and constructor signatures would still live in `Chart2D.fs`. + +F# has no partial classes, so we cannot simply split `type Chart` across files the way [src/Plotly.NET.CSharp/ChartAPI/](src/Plotly.NET.CSharp/ChartAPI/) does with `public static partial class Chart`. + +## Mechanism already in the codebase + +The current layout already does a partial-class-like split across families. Each family file defines its own `[] module` containing an `[] type Chart` whose members are all marked `[]`. Example from [Chart2D.fs:13-17](src/Plotly.NET/ChartAPI/Chart2D.fs#L13-L17): + +```fsharp +[] +module Chart2D = + [] + type Chart = + [] + static member Scatter(...) = ... +``` + +This compiles to a CLR class `Plotly.NET.Chart2D+Chart` carrying static methods with `[ExtensionAttribute]`. When `module Chart2D` is auto-opened, those methods are resolved by the F# compiler as extension members on the base `Plotly.NET.Chart` type from [Chart.fs](src/Plotly.NET/ChartAPI/Chart.fs), so user code keeps calling `Chart.Scatter(...)` uniformly regardless of which file the overload lives in. + +There are already 8 `type Chart =` declarations coexisting this way (Chart2D, Chart3D, ChartCarpet, ChartDomain, ChartMap, ChartPolar, ChartSmith, ChartTernary). The proposal is to apply the same mechanism at finer granularity across the large extension-based Chart API families while keeping the base `Chart.fs` type out of scope for this refactor. + +## Proposed layout + +Split each large extension-based Chart API file into one F# file per chart-type group. The public API surface stays byte-identical; only the physical location of each `static member` changes. + +``` +src/Plotly.NET/ChartAPI/ + Chart.fs // base type Chart (unchanged) + Chart2D/ + Chart2D_Scatter.fs // Scatter / Point / Line / Spline / Bubble / Range + Chart2D_Area.fs // Area / SplineArea / StackedArea + Chart2D_Bar.fs // Bar / StackedBar / Column / StackedColumn + Chart2D_Funnel.fs // Funnel / StackedFunnel / Waterfall + Chart2D_Histogram.fs // Histogram / Histogram2D / Histogram2DContour + Chart2D_Distribution.fs // BoxPlot / Violin + Chart2D_Heatmap.fs // Heatmap / AnnotatedHeatmap / Image / Contour + Chart2D_Finance.fs // OHLC / Candlestick + Chart2D_Splom.fs // Splom / PointDensity + Chart2D_Statistical.fs // Pareto / Residual + Chart3D/ + Chart3D_Scatter.fs // Scatter3D / Point3D / Line3D / Bubble3D + Chart3D_Surface.fs // Surface / Mesh3D + Chart3D_VectorField.fs // Cone / StreamTube + Chart3D_Volume.fs // Volume / IsoSurface + ChartPolar/ + ChartPolar_Scatter.fs // ScatterPolar / PointPolar / LinePolar / SplinePolar / BubblePolar + ChartPolar_Bar.fs // BarPolar + ChartMap/ + ChartMap_Geo.fs // ChoroplethMap / ScatterGeo / PointGeo / LineGeo / BubbleGeo + ChartMap_Mapbox.fs // ScatterMapbox / PointMapbox / LineMapbox / BubbleMapbox + ChartMap_Density.fs // ChoroplethMapbox / DensityMapbox + ChartTernary/ + ChartTernary_Scatter.fs // ScatterTernary / PointTernary / LineTernary / BubbleTernary + ChartCarpet/ + ChartCarpet_Base.fs // Carpet + ChartCarpet_Scatter.fs // ScatterCarpet / PointCarpet / LineCarpet / SplineCarpet / BubbleCarpet + ChartCarpet_Contour.fs // ContourCarpet + ChartDomain/ + ChartDomain_Pie.fs // Pie / Doughnut / FunnelArea + ChartDomain_Hierarchy.fs // Sunburst / Treemap + ChartDomain_Relations.fs // ParallelCoord / ParallelCategories / Sankey + ChartDomain_Table.fs // Table / Indicator + ChartDomain_Icicle.fs // Icicle + ChartSmith/ + ChartSmith_Scatter.fs // ScatterSmith / PointSmith / LineSmith / BubbleSmith + Chart2D.fs // already removed + Chart3D.fs // trimmed remainder or deleted at the end + ChartPolar.fs // trimmed remainder or deleted at the end + ChartMap.fs // trimmed remainder or deleted at the end + ChartTernary.fs // trimmed remainder or deleted at the end + ChartCarpet.fs // trimmed remainder or deleted at the end + ChartDomain.fs // trimmed remainder or deleted at the end + ChartSmith.fs // trimmed remainder or deleted at the end +``` + +Each new file follows the established pattern: + +```fsharp +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects +open System +open System.Runtime.CompilerServices + +[] +module Chart2D_Scatter = + [] + type Chart = + [] + static member Scatter(...) = ... + [] + static member Point(...) = ... + // etc. +``` + +Key rules: + +- Group overloads of the same `Chart.Foo` member into the **same** file. Never split overloads of one member name across files — F# overload resolution only works on members declared inside a single `type` block. +- Group closely related members that share private helpers into the same file (e.g. `Scatter`/`Point`/`Line`/`Bubble` all build the same `Marker`/`Line` objects and call the same `renderScatterTrace` helper). +- Do **not** introduce a shared helper file up front unless a second split actually needs one. The current helpers are tiny; extract them only when the move would otherwise duplicate code or block file ordering. +- File-level `AutoOpen` module names must be unique (`Chart2D_Scatter`, `Chart2D_Bar`, ...) so auto-open does not collide and each container `Chart` type gets a distinct CLR name. + +## Rejected alternatives + +### Alt A: Body offloading per chart type + +Keep `Chart2D.fs` as-is but move each overload body into a per-chart-type implementation module (`module Chart2DImpl.ScatterImpl`) and forward from the thin `static member`. Rejected: + +- `Chart2D.fs` stays ~6–7k lines as a forwarder shell because XML docs and parameter lists dominate the bulk, not bodies. +- Adds an indirection hop and a parallel naming surface (`ScatterImpl.create`) that the rest of the codebase does not use. +- It may still be a reasonable follow-up cleanup inside an extracted file, but it does not solve the actual file-size problem. + +### Alt B: Parameter records to collapse overloads + +Introduce e.g. a `ScatterArgs` record and reduce the 3–4 overloads per chart to a single implementation. Rejected: + +- Changes API surface and migration risk is high. +- Orthogonal to the file-size problem — can be considered later as a separate refactor. + +### Alt C: Source generation from the plotly.js schema + +Generate the chart API from upstream schema. Rejected for this plan: + +- Massive scope; affects every `Trace*Style` and docs toolchain. +- Worth revisiting long-term, but not a prerequisite for fixing file size today. + +### Alt D: Do nothing + +Agent tools can already chunk large files, and the code works. Rejected because: + +- `Chart2D.fs` is the dominant context-cost file for any task touching 2D charts. +- Human navigation (jump-to-member, diff review) is noticeably slow on 9k-line files. + +## Risks and verification + +- **Overload resolution across files.** F# cannot overload across separate `type Chart` declarations. Mitigation: group all overloads of one member name into one file (enforced by the rule above). The PoC commit (Chart2D_Scatter) exercises this: `Chart.Scatter` has 4 overloads and must compile and resolve identically. +- **Name collision across auto-open modules.** Two files must not define the same container module name. Mitigation: one consistent naming scheme (`_`). +- **C# consumers.** The wrapper files under [src/Plotly.NET.CSharp/ChartAPI/](src/Plotly.NET.CSharp/ChartAPI/) call the F# CLR containers directly. After splitting, those calls must be retargeted to the new container names (`Plotly.NET.Chart3D_Scatter.Chart.*`, `Plotly.NET.ChartMap_Geo.Chart.*`, etc.). Verify by running `./build.cmd runTestsCore`, which already covers C# interoperability. +- **Internal visibility.** If a later split needs shared helpers, they must remain reachable from every family file. Mitigation: only extract helpers when needed, and keep them `internal` in a shared file ordered before dependents. +- **Documentation and fsdocs.** [docs/](docs/) references the public API by member name, not file path — unaffected. Verify a docs build locally after the PoC. +- **.fsproj compile order.** F# is order-sensitive. Mitigation: explicit `` entries in [Plotly.NET.fsproj](src/Plotly.NET/Plotly.NET.fsproj), with any shared helper file placed before dependents only if such a file becomes necessary. +- **Refactor scope creep.** `Chart2D.fs` was the obvious first target, but expanding across the remaining family files increases churn. Mitigation: keep `Chart.fs` explicitly out of scope, preserve family-by-family grouping, and verify with `runTestsCore` after each wave. + +## Commit packages + +Each commit is independently buildable and testable. Follow the repo entry points (`./build.cmd` or `./build.sh`), with the relevant test target running after each commit. + +### Commit 1: PoC — split Scatter family out of Chart2D.fs [done] + +Scope: + +- Create `src/Plotly.NET/ChartAPI/Chart2D/`. +- Add `Chart2D_Scatter.fs` in `src/Plotly.NET/ChartAPI/Chart2D/`, containing all overloads of `Scatter`, `Point`, `Line`, `Spline`, `Bubble`, `Range`. +- Remove the migrated members from `Chart2D.fs`. +- Keep `renderScatterTrace` in the moved file unless extracting it is required by file ordering or reuse. +- Update `Plotly.NET.fsproj` `` ordering: the new file goes **before** the trimmed `Chart2D.fs`. +- Run `./build.cmd`, then `./build.cmd runTestsCore` to confirm no regression. +- If all green, this PoC confirms the mechanism and unblocks the rest of the plan. + +Exit criteria: + +- Build green and core tests green. +- `Chart2D.fs` shrinks substantially. +- No intended public API diff. + +Implementation notes: + +- Created `src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Scatter.fs` and moved `renderScatterTrace` plus the `Scatter` / `Point` / `Line` / `Spline` / `Bubble` / `Range` overload groups there. +- Trimmed `src/Plotly.NET/ChartAPI/Chart2D.fs` so it retains `renderHeatmapTrace` and starts with `Area`. +- Added the new file to `src/Plotly.NET/Plotly.NET.fsproj` ahead of `Chart2D.fs`. +- Updated `src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs` so the wrapper calls the new CLR container for the moved members (`Plotly.NET.Chart2D_Scatter.Chart`). +- Verified with `./build.cmd runTestsCore` successfully: build passed and 933/933 core tests passed. + +### Commit 2: Area + Bar + Funnel families [done] + +Scope: + +- `Chart2D_Area.fs` — Area / SplineArea / StackedArea. +- `Chart2D_Bar.fs` — Bar / StackedBar / Column / StackedColumn. +- `Chart2D_Funnel.fs` — Funnel / StackedFunnel / Waterfall. +- Remove migrated members from `Chart2D.fs`; update fsproj. + +Implementation notes: + +- Added `Chart2D_Area.fs`, `Chart2D_Bar.fs`, and `Chart2D_Funnel.fs` under `src/Plotly.NET/ChartAPI/Chart2D/`. +- Retargeted the matching C# wrapper calls in `src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs`. +- Verified with `./build.cmd runTestsCore` successfully. + +### Commit 3: Histogram + Distribution families [done] + +Scope: + +- `Chart2D_Histogram.fs` — Histogram / Histogram2D / Histogram2DContour. +- `Chart2D_Distribution.fs` — BoxPlot / Violin. +- Remove from `Chart2D.fs`; update fsproj. + +Implementation notes: + +- Added `Chart2D_Histogram.fs` and `Chart2D_Distribution.fs`. +- Retargeted the matching C# wrapper calls in `src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs`. +- Verified with `./build.cmd runTestsCore` successfully as part of the full Chart2D split. + +### Commit 4: Heatmap + Finance + Splom + Statistical families [done] + +Scope: + +- `Chart2D_Heatmap.fs` — Heatmap / AnnotatedHeatmap / Image / Contour. +- `Chart2D_Finance.fs` — OHLC / Candlestick. +- `Chart2D_Splom.fs` — Splom / PointDensity. +- `Chart2D_Statistical.fs` — Pareto / Residual. +- `Chart2D.fs` was deleted after the constructor families were fully migrated; the split now lives entirely under `ChartAPI/Chart2D/`. + +Implementation notes: + +- Added `Chart2D_Heatmap.fs`, `Chart2D_Finance.fs`, `Chart2D_Splom.fs`, and `Chart2D_Statistical.fs`. +- Moved `renderHeatmapTrace` into `Chart2D_Heatmap.fs`. +- Retargeted the remaining C# wrapper calls in `src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs`. +- Removed `src/Plotly.NET/ChartAPI/Chart2D.fs` and its `Plotly.NET.fsproj` entry once the transitional placeholder was no longer needed. +- Verified with `./build.cmd runTestsCore` successfully: build passed and 933/933 core tests passed. + +### Commit 5: Chart3D + ChartPolar + ChartTernary + ChartSmith families [done] + +Scope: + +- `Chart3D_Scatter.fs` — Scatter3D / Point3D / Line3D / Bubble3D. +- `Chart3D_Surface.fs` — Surface / Mesh3D. +- `Chart3D_VectorField.fs` — Cone / StreamTube. +- `Chart3D_Volume.fs` — Volume / IsoSurface. +- `ChartPolar_Scatter.fs` — ScatterPolar / PointPolar / LinePolar / SplinePolar / BubblePolar, carrying `renderScatterPolarTrace`. +- `ChartPolar_Bar.fs` — BarPolar. +- `ChartTernary_Scatter.fs` — ScatterTernary / PointTernary / LineTernary / BubbleTernary. +- `ChartSmith_Scatter.fs` — ScatterSmith / PointSmith / LineSmith / BubbleSmith. +- Remove the original family files once all constructor groups are migrated and fsproj ordering is updated. +- Retarget the matching C# wrapper files (`Chart3D.cs`, `ChartPolar.cs`, `ChartTernary.cs`, `ChartSmith.cs`). +- Run `./build.cmd runTestsCore`. + +Status: + +- Done. + +Implementation notes: + +- Added `Chart3D_Scatter.fs`, `Chart3D_Surface.fs`, `Chart3D_VectorField.fs`, and `Chart3D_Volume.fs` under `src/Plotly.NET/ChartAPI/Chart3D/`. +- Added `ChartPolar_Scatter.fs` and `ChartPolar_Bar.fs`, moving `renderScatterPolarTrace` into `ChartPolar_Scatter.fs`. +- Added `ChartTernary_Scatter.fs` and `ChartSmith_Scatter.fs`. +- Removed the original `Chart3D.fs`, `ChartPolar.fs`, `ChartTernary.fs`, and `ChartSmith.fs` files and replaced their `Plotly.NET.fsproj` entries with the new per-family files. +- Retargeted the matching C# wrapper calls in `src/Plotly.NET.CSharp/ChartAPI/Chart3D.cs`, `ChartPolar.cs`, `ChartTernary.cs`, and `ChartSmith.cs`. +- Verified with `./build.cmd runTestsCore` successfully as part of the full branch verification. + +### Commit 6: ChartMap + ChartCarpet + ChartDomain families [done] + +Scope: + +- `ChartMap_Geo.fs` — ChoroplethMap / ScatterGeo / PointGeo / LineGeo / BubbleGeo. +- `ChartMap_Mapbox.fs` — ScatterMapbox / PointMapbox / LineMapbox / BubbleMapbox. +- `ChartMap_Density.fs` — ChoroplethMapbox / DensityMapbox. +- `ChartCarpet_Base.fs` — Carpet. +- `ChartCarpet_Scatter.fs` — ScatterCarpet / PointCarpet / LineCarpet / SplineCarpet / BubbleCarpet. +- `ChartCarpet_Contour.fs` — ContourCarpet. +- `ChartDomain_Pie.fs` — Pie / Doughnut / FunnelArea. +- `ChartDomain_Hierarchy.fs` — Sunburst / Treemap. +- `ChartDomain_Relations.fs` — ParallelCoord / ParallelCategories / Sankey. +- `ChartDomain_Table.fs` — Table / Indicator. +- `ChartDomain_Icicle.fs` — Icicle. +- Remove the original family files once all constructor groups are migrated and fsproj ordering is updated. +- Retarget the matching C# wrapper files (`ChartMap.cs`, `ChartCarpet.cs`, `ChartDomain.cs`). +- Run `./build.cmd runTestsCore`. + +Status: + +- Done. + +Implementation notes: + +- Added `ChartMap_Geo.fs`, `ChartMap_Mapbox.fs`, and `ChartMap_Density.fs` under `src/Plotly.NET/ChartAPI/ChartMap/`. +- Added `ChartCarpet_Base.fs`, `ChartCarpet_Scatter.fs`, and `ChartCarpet_Contour.fs` under `src/Plotly.NET/ChartAPI/ChartCarpet/`. +- Added `ChartDomain_Pie.fs`, `ChartDomain_Hierarchy.fs`, `ChartDomain_Relations.fs`, `ChartDomain_Table.fs`, and `ChartDomain_Icicle.fs` under `src/Plotly.NET/ChartAPI/ChartDomain/`. +- Removed the original `ChartMap.fs`, `ChartCarpet.fs`, and `ChartDomain.fs` files and replaced their `Plotly.NET.fsproj` entries with the new per-family files. +- Retargeted the matching C# wrapper calls in `src/Plotly.NET.CSharp/ChartAPI/ChartMap.cs`, `ChartCarpet.cs`, and `ChartDomain.cs`. +- Updated internal repo references that still assumed the old monoliths: `tests/Common/FSharpTestBase/TestCharts/ChartDomainTestCharts.fs` now uses `Chart.Indicator`, and both playground scripts now `#load` the split files. +- Verified with `./build.cmd runTestsCore` successfully: build passed and 933/933 core tests passed. + +### Final checkpoint + +After Commit 6 lands: + +- Reassess whether [Chart.fs](src/Plotly.NET/ChartAPI/Chart.fs) should stay as-is. It remains explicitly out of scope for this plan unless a later follow-up chooses to redesign the base `Chart` type. +- Confirm every extension-based family now lives in a per-family subdirectory under `ChartAPI/`. +- Keep any future `Chart.fs` work as a separate design/refactor effort, not an automatic continuation of this branch. + +Status: + +- Reached. The extension-based Chart API families now live under per-family subdirectories, and `Chart.fs` remains the only intentionally unsplit top-level Chart API file. + +## Open questions + +- Do we keep flat `Chart2D_X.fs` filenames in the existing `ChartAPI/` directory, or move to a `ChartAPI/Chart2D/` subdirectory? **Recommendation: use a `ChartAPI/Chart2D/` subdirectory** because it is cleaner for maintainers, keeps related constructor groups together, and scales better if other large families are ever split later. +- Should internal helpers live on a shared `Chart` type (via a future `Chart2D_Shared.fs`) or as free module-level functions? **Recommendation: defer this** until a second split actually needs shared code. Avoid inventing a helper layer before there is concrete reuse pressure. +- Naming: `Chart2D_Scatter` vs `Chart2DScatter` vs `Chart2D.Scatter`? The underscore form is unambiguous and avoids clashing with a nested module path. **Recommendation: underscore.** diff --git a/src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs b/src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs index f5d9f0e6..c8766e6b 100644 --- a/src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs +++ b/src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs @@ -88,7 +88,7 @@ public static GenericChart Scatter( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Scatter( + Plotly.NET.Chart2D_Scatter.Chart.Scatter( x: x, y: y, mode: mode, @@ -178,7 +178,7 @@ public static GenericChart Point( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Point( + Plotly.NET.Chart2D_Scatter.Chart.Point( x: x, y: y, Name: Name.ToOption(), @@ -275,7 +275,7 @@ public static GenericChart Line( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Line( + Plotly.NET.Chart2D_Scatter.Chart.Line( x: x, y: y, ShowMarkers: ShowMarkers.ToOption(), @@ -384,7 +384,7 @@ public static GenericChart Spline( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Spline( + Plotly.NET.Chart2D_Scatter.Chart.Spline( x: x, y: y, ShowMarkers: ShowMarkers.ToOption(), @@ -485,7 +485,7 @@ public static GenericChart Bubble( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Bubble( + Plotly.NET.Chart2D_Scatter.Chart.Bubble( x: x, y: y, sizes: sizes, @@ -604,7 +604,7 @@ public static GenericChart Range( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Range( + Plotly.NET.Chart2D_Scatter.Chart.Range( x: x, y: y, upper: upper, @@ -658,7 +658,7 @@ public static GenericChart Pareto( ) where TLabel : IConvertible => - Chart2D.Chart.Pareto( + Chart2D_Statistical.Chart.Pareto( keysValues.Select(t => t.ToTuple()) , Name: Name.ToOption() , Label: Label.ToOption() @@ -679,7 +679,7 @@ IEnumerable labels ) where TLabel : IConvertible => - Chart2D.Chart.Pareto( + Chart2D_Statistical.Chart.Pareto( labels , values , Name: Name.ToOption() @@ -758,7 +758,7 @@ public static GenericChart Area( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Area( + Plotly.NET.Chart2D_Area.Chart.Area( x: x, y: y, ShowMarkers: ShowMarkers.ToOption(), @@ -866,7 +866,7 @@ public static GenericChart SplineArea( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.SplineArea( + Plotly.NET.Chart2D_Area.Chart.SplineArea( x: x, y: y, ShowMarkers: ShowMarkers.ToOption(), @@ -967,7 +967,7 @@ public static GenericChart StackedArea( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.StackedArea( + Plotly.NET.Chart2D_Area.Chart.StackedArea( x: x, y: y, ShowMarkers: ShowMarkers.ToOption(), @@ -1062,7 +1062,7 @@ public static GenericChart Funnel( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Funnel( + Plotly.NET.Chart2D_Funnel.Chart.Funnel( x: x, y: y, Name: Name.ToOption(), @@ -1155,7 +1155,7 @@ public static GenericChart StackedFunnel( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.StackedFunnel( + Plotly.NET.Chart2D_Funnel.Chart.StackedFunnel( x: x, y: y, Name: Name.ToOption(), @@ -1245,7 +1245,7 @@ public static GenericChart Waterfall( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Waterfall( + Plotly.NET.Chart2D_Funnel.Chart.Waterfall( x: x, y: y, Name: Name.ToOption(), @@ -1328,7 +1328,7 @@ public static GenericChart Bar( where KeysType : IConvertible where TextType: IConvertible => - Plotly.NET.Chart2D.Chart.Bar( + Plotly.NET.Chart2D_Bar.Chart.Bar( values: values, Keys: Keys.ToOption(), MultiKeys: MultiKeys.ToOption(), @@ -1409,7 +1409,7 @@ public static GenericChart StackedBar( where KeysType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.StackedBar( + Plotly.NET.Chart2D_Bar.Chart.StackedBar( values: values, Keys: Keys.ToOption(), MultiKeys: MultiKeys.ToOption(), @@ -1489,7 +1489,7 @@ public static GenericChart Column( where KeysType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Column( + Plotly.NET.Chart2D_Bar.Chart.Column( values: values, Keys: Keys.ToOption(), MultiKeys: MultiKeys.ToOption(), @@ -1570,7 +1570,7 @@ public static GenericChart StackedColumn( where KeysType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.StackedColumn( + Plotly.NET.Chart2D_Bar.Chart.StackedColumn( values: values, Keys: Keys.ToOption(), MultiKeys: MultiKeys.ToOption(), @@ -1675,7 +1675,7 @@ public static GenericChart Histogram( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Histogram( + Plotly.NET.Chart2D_Histogram.Chart.Histogram( X: X.ToOption(), MultiX: MultiX.ToOption(), Y: Y.ToOption(), @@ -1762,7 +1762,7 @@ public static GenericChart Histogram2D( where YType : IConvertible where ZType : IConvertible => - Plotly.NET.Chart2D.Chart.Histogram2D, ZType>( + Plotly.NET.Chart2D_Histogram.Chart.Histogram2D, ZType>( x: x, y: y, Z: Z.ToOption(), @@ -1854,7 +1854,7 @@ public static GenericChart BoxPlot( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.BoxPlot( + Plotly.NET.Chart2D_Distribution.Chart.BoxPlot( X: X.ToOption(), MultiX: MultiX.ToOption(), Y: Y.ToOption(), @@ -1966,7 +1966,7 @@ public static GenericChart Violin( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Violin( + Plotly.NET.Chart2D_Distribution.Chart.Violin( X: X.ToOption(), MultiX: MultiX.ToOption(), Y: Y.ToOption(), @@ -2090,7 +2090,7 @@ public static GenericChart Histogram2DContour( where YType : IConvertible where ZType : IConvertible => - Plotly.NET.Chart2D.Chart.Histogram2DContour, ZType>( + Plotly.NET.Chart2D_Histogram.Chart.Histogram2DContour, ZType>( X: X.ToOption(), MultiX: MultiX.ToOption(), Y: Y.ToOption(), @@ -2185,7 +2185,7 @@ public static GenericChart Heatmap( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Heatmap, ZType, XType, YType, TextType>( + Plotly.NET.Chart2D_Heatmap.Chart.Heatmap, ZType, XType, YType, TextType>( zData: zData, X: X.ToOption(), MultiX: MultiX.ToOption(), @@ -2267,7 +2267,7 @@ public static GenericChart AnnotatedHeatmap( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.AnnotatedHeatmap, ZType, IEnumerable, XType, YType, TextType>( + Plotly.NET.Chart2D_Heatmap.Chart.AnnotatedHeatmap, ZType, IEnumerable, XType, YType, TextType>( zData: zData, annotationText: annotationText, Name: Name.ToOption(), @@ -2321,7 +2321,7 @@ public static GenericChart Image( ) where IdType : IConvertible => - Plotly.NET.Chart2D.Chart.Image>, IEnumerable, IdType>( + Plotly.NET.Chart2D_Heatmap.Chart.Image>, IEnumerable, IdType>( Z: Z.ToOption(), Source: Source.ToOption(), Name: Name.ToOption(), @@ -2413,7 +2413,7 @@ public static GenericChart Contour( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Contour, ZType, XType, YType, TextType>( + Plotly.NET.Chart2D_Heatmap.Chart.Contour, ZType, XType, YType, TextType>( zData: zData, Name: Name.ToOption(), ShowLegend: ShowLegend.ToOption(), @@ -2498,7 +2498,7 @@ public static GenericChart OHLC( where XType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.OHLC( + Plotly.NET.Chart2D_Finance.Chart.OHLC( open: open, high: high, low: low, @@ -2569,7 +2569,7 @@ public static GenericChart Candlestick( where XType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Candlestick( + Plotly.NET.Chart2D_Finance.Chart.Candlestick( open: open, high: high, low: low, @@ -2634,7 +2634,7 @@ public static GenericChart Splom( ) where TextType : IConvertible => - Plotly.NET.Chart2D.Chart.Splom( + Plotly.NET.Chart2D_Splom.Chart.Splom( dimensions: dimensions, Name: Name.ToOption(), ShowLegend: ShowLegend.ToOption(), @@ -2720,7 +2720,7 @@ public static GenericChart PointDensity( where XType : IConvertible where YType : IConvertible => - Plotly.NET.Chart2D.Chart.PointDensity( + Plotly.NET.Chart2D_Splom.Chart.PointDensity( x: x, y: y, PointOpacity: PointOpacity.ToOption(), diff --git a/src/Plotly.NET.CSharp/ChartAPI/Chart3D.cs b/src/Plotly.NET.CSharp/ChartAPI/Chart3D.cs index bd301559..a5b78bd4 100644 --- a/src/Plotly.NET.CSharp/ChartAPI/Chart3D.cs +++ b/src/Plotly.NET.CSharp/ChartAPI/Chart3D.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -82,7 +82,7 @@ public static GenericChart Scatter3D( where ZType : IConvertible where TextType : IConvertible - => Plotly.NET.Chart3D.Chart.Scatter3D( + => Plotly.NET.Chart3D_Scatter.Chart.Scatter3D( x: x, y: y, z: z, @@ -166,7 +166,7 @@ public static GenericChart Point3D( where ZType : IConvertible where TextType : IConvertible - => Plotly.NET.Chart3D.Chart.Point3D( + => Plotly.NET.Chart3D_Scatter.Chart.Point3D( x: x, y: y, z: z, @@ -256,7 +256,7 @@ public static GenericChart Line3D( where ZType : IConvertible where TextType : IConvertible - => Plotly.NET.Chart3D.Chart.Line3D( + => Plotly.NET.Chart3D_Scatter.Chart.Line3D( x: x, y: y, z: z, @@ -342,7 +342,7 @@ public static GenericChart Bubble3D( where ZType : IConvertible where TextType : IConvertible - => Plotly.NET.Chart3D.Chart.Bubble3D( + => Plotly.NET.Chart3D_Scatter.Chart.Bubble3D( x: x, y: y, z: z, @@ -412,7 +412,7 @@ public static GenericChart Surface( where YType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart3D.Chart.Surface, ZType, XType, YType, TextType>( + Plotly.NET.Chart3D_Surface.Chart.Surface, ZType, XType, YType, TextType>( zData: zData, X: X.ToOption(), Y: Y.ToOption(), @@ -494,7 +494,7 @@ public static GenericChart Mesh3D - Plotly.NET.Chart3D.Chart.Mesh3D( + Plotly.NET.Chart3D_Surface.Chart.Mesh3D( x: x, y: y, z: z, @@ -577,7 +577,7 @@ public static GenericChart Cone - Plotly.NET.Chart3D.Chart.Cone( + Plotly.NET.Chart3D_VectorField.Chart.Cone( x: x, y: y, z: z, @@ -660,7 +660,7 @@ public static GenericChart StreamTube - Plotly.NET.Chart3D.Chart.StreamTube( + Plotly.NET.Chart3D_VectorField.Chart.StreamTube( x: x, y: y, z: z, @@ -741,7 +741,7 @@ public static GenericChart Volume - Plotly.NET.Chart3D.Chart.Volume, OpacityScaleType>( + Plotly.NET.Chart3D_Volume.Chart.Volume, OpacityScaleType>( x: x, y: y, z: z, @@ -823,7 +823,7 @@ public static GenericChart IsoSurface( where ValueType : IConvertible where TextType : IConvertible => - Plotly.NET.Chart3D.Chart.IsoSurface( + Plotly.NET.Chart3D_Volume.Chart.IsoSurface( x: x, y: y, z: z, @@ -847,3 +847,4 @@ public static GenericChart IsoSurface( ); } } + diff --git a/src/Plotly.NET.CSharp/ChartAPI/ChartCarpet.cs b/src/Plotly.NET.CSharp/ChartAPI/ChartCarpet.cs index 246d07e3..43d8e98e 100644 --- a/src/Plotly.NET.CSharp/ChartAPI/ChartCarpet.cs +++ b/src/Plotly.NET.CSharp/ChartAPI/ChartCarpet.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -71,7 +71,7 @@ public static GenericChart Carpet - Plotly.NET.ChartCarpet.Chart.Carpet, MultiXType, YType, IEnumerable, MultiYType, AType, BType>( + Plotly.NET.ChartCarpet_Base.Chart.Carpet, MultiXType, YType, IEnumerable, MultiYType, AType, BType>( carpetId: carpetId, Name: Name.ToOption(), ShowLegend: ShowLegend.ToOption(), @@ -154,7 +154,7 @@ public static GenericChart ScatterCarpet( where BType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartCarpet.Chart.ScatterCarpet( + Plotly.NET.ChartCarpet_Scatter.Chart.ScatterCarpet( a: a, b: b, mode: mode, @@ -230,7 +230,7 @@ public static GenericChart PointCarpet( where BType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartCarpet.Chart.PointCarpet( + Plotly.NET.ChartCarpet_Scatter.Chart.PointCarpet( a: a, b: b, carpetAnchorId: carpetAnchorId, @@ -312,7 +312,7 @@ public static GenericChart LineCarpet( where BType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartCarpet.Chart.LineCarpet( + Plotly.NET.ChartCarpet_Scatter.Chart.LineCarpet( a: a, b: b, carpetAnchorId: carpetAnchorId, @@ -403,7 +403,7 @@ public static GenericChart SplineCarpet( where BType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartCarpet.Chart.SplineCarpet( + Plotly.NET.ChartCarpet_Scatter.Chart.SplineCarpet( a: a, b: b, carpetAnchorId: carpetAnchorId, @@ -494,7 +494,7 @@ public static GenericChart BubbleCarpet( where BType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartCarpet.Chart.BubbleCarpet( + Plotly.NET.ChartCarpet_Scatter.Chart.BubbleCarpet( a: a, b: b, sizes: sizes, @@ -583,7 +583,7 @@ public static GenericChart ContourCarpet( where BType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartCarpet.Chart.ContourCarpet( + Plotly.NET.ChartCarpet_Contour.Chart.ContourCarpet( z: z, carpetAnchorId: carpetAnchorId, Name: Name.ToOption(), @@ -612,3 +612,4 @@ public static GenericChart ContourCarpet( ); } } + diff --git a/src/Plotly.NET.CSharp/ChartAPI/ChartDomain.cs b/src/Plotly.NET.CSharp/ChartAPI/ChartDomain.cs index 1d3a0e2b..d4805812 100644 --- a/src/Plotly.NET.CSharp/ChartAPI/ChartDomain.cs +++ b/src/Plotly.NET.CSharp/ChartAPI/ChartDomain.cs @@ -1,4 +1,4 @@ -using Microsoft.FSharp.Core; +using Microsoft.FSharp.Core; using Plotly.NET; using Plotly.NET.LayoutObjects; using Plotly.NET.TraceObjects; @@ -77,7 +77,7 @@ public static GenericChart Pie( where LabelsType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartDomain.Chart.Pie( + Plotly.NET.ChartDomain_Pie.Chart.Pie( values: values, Name: Name.ToOption(), ShowLegend: ShowLegend.ToOption(), @@ -172,7 +172,7 @@ public static GenericChart Doughnut( where LabelsType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartDomain.Chart.Doughnut( + Plotly.NET.ChartDomain_Pie.Chart.Doughnut( values: values, Name: Name.ToOption(), ShowLegend: ShowLegend.ToOption(), @@ -260,7 +260,7 @@ public static GenericChart FunnelArea( where LabelsType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartDomain.Chart.FunnelArea( + Plotly.NET.ChartDomain_Pie.Chart.FunnelArea( values: values, Name: Name.ToOption(), ShowLegend: ShowLegend.ToOption(), @@ -363,7 +363,7 @@ public static GenericChart Sunburst - Plotly.NET.ChartDomain.Chart.Sunburst( + Plotly.NET.ChartDomain_Hierarchy.Chart.Sunburst( labels: labels, parents: parents, Values: Values.ToOption(), @@ -479,7 +479,7 @@ public static GenericChart Treemap - Plotly.NET.ChartDomain.Chart.Treemap( + Plotly.NET.ChartDomain_Hierarchy.Chart.Treemap( labels: labels, parents: parents, Values: Values.ToOption(), @@ -553,7 +553,7 @@ public static GenericChart ParallelCoord( Optional UseDefaults = default ) => - Plotly.NET.ChartDomain.Chart.ParallelCoord( + Plotly.NET.ChartDomain_Relations.Chart.ParallelCoord( dimensions: dimensions, Name: Name.ToOption(), LineColor: LineColor.ToOption(), @@ -610,7 +610,7 @@ public static GenericChart ParallelCategories( Optional UseDefaults = default ) => - Plotly.NET.ChartDomain.Chart.ParallelCategories( + Plotly.NET.ChartDomain_Relations.Chart.ParallelCategories( dimensions: dimensions, Name: Name.ToOption(), Counts: Counts.ToOption(), @@ -659,7 +659,7 @@ public static GenericChart Sankey( ) where IdsType : IConvertible => - Plotly.NET.ChartDomain.Chart.Sankey( + Plotly.NET.ChartDomain_Relations.Chart.Sankey( nodes: nodes, links: links, Name: Name.ToOption(), @@ -694,7 +694,7 @@ public static GenericChart Table( Optional UseDefaults = default ) => - Plotly.NET.ChartDomain.Chart.Table( + Plotly.NET.ChartDomain_Table.Chart.Table( header: header, cells: cells, Name: Name.ToOption(), @@ -745,7 +745,7 @@ public static GenericChart Indicator( ) where ValueType : IConvertible => - Plotly.NET.ChartDomain.Chart.Indicator( + Plotly.NET.ChartDomain_Table.Chart.Indicator( value: value, mode: mode, Range: Range.ToOption(), @@ -847,7 +847,7 @@ public static GenericChart Icicle - Plotly.NET.ChartDomain.Chart.Icicle( + Plotly.NET.ChartDomain_Icicle.Chart.Icicle( labels: labels, parents: parents, Values: Values.ToOption(), @@ -886,3 +886,4 @@ public static GenericChart Icicle( where ZType: IConvertible where TextType : IConvertible => - Plotly.NET.ChartMap.Chart.ChoroplethMap( + Plotly.NET.ChartMap_Geo.Chart.ChoroplethMap( locations: locations, z: z, Name: Name.ToOption(), @@ -133,7 +133,7 @@ public static GenericChart ScatterGeo( where LatitudesType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartMap.Chart.ScatterGeo( + Plotly.NET.ChartMap_Geo.Chart.ScatterGeo( longitudes: longitudes, latitudes: latitudes, mode: mode, @@ -213,7 +213,7 @@ public static GenericChart PointGeo( where LatitudesType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartMap.Chart.PointGeo( + Plotly.NET.ChartMap_Geo.Chart.PointGeo( longitudes: longitudes, latitudes: latitudes, Name: Name.ToOption(), @@ -299,7 +299,7 @@ public static GenericChart LineGeo( where LatitudesType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartMap.Chart.LineGeo( + Plotly.NET.ChartMap_Geo.Chart.LineGeo( longitudes: longitudes, latitudes: latitudes, ShowMarkers: ShowMarkers.ToOption(), @@ -381,7 +381,7 @@ public static GenericChart BubbleGeo( where LatitudesType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartMap.Chart.BubbleGeo( + Plotly.NET.ChartMap_Geo.Chart.BubbleGeo( longitudes: longitudes, latitudes: latitudes, sizes: sizes, @@ -474,7 +474,7 @@ public static GenericChart ScatterMapbox - Plotly.NET.ChartMap.Chart.ScatterMapbox( + Plotly.NET.ChartMap_Mapbox.Chart.ScatterMapbox( longitudes: longitudes, latitudes: latitudes, mode: mode, @@ -559,7 +559,7 @@ public static GenericChart PointMapbox( where LatitudesType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartMap.Chart.PointMapbox( + Plotly.NET.ChartMap_Mapbox.Chart.PointMapbox( longitudes: longitudes, latitudes: latitudes, Name: Name.ToOption(), @@ -646,7 +646,7 @@ public static GenericChart LineMapbox( where LatitudesType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartMap.Chart.LineMapbox( + Plotly.NET.ChartMap_Mapbox.Chart.LineMapbox( longitudes: longitudes, latitudes: latitudes, ShowMarkers: ShowMarkers.ToOption(), @@ -727,7 +727,7 @@ public static GenericChart BubbleMapbox where LatitudesType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartMap.Chart.BubbleMapbox( + Plotly.NET.ChartMap_Mapbox.Chart.BubbleMapbox( longitudes: longitudes, latitudes: latitudes, sizes: sizes, @@ -796,7 +796,7 @@ public static GenericChart ChoroplethMapbox( where ZType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartMap.Chart.ChoroplethMapbox( + Plotly.NET.ChartMap_Density.Chart.ChoroplethMapbox( locations: locations, z: z, Name: Name.ToOption(), @@ -860,7 +860,7 @@ public static GenericChart DensityMapbox - Plotly.NET.ChartMap.Chart.DensityMapbox( + Plotly.NET.ChartMap_Density.Chart.DensityMapbox( longitudes: longitudes, latitudes: latitudes, Name: Name.ToOption(), @@ -880,3 +880,4 @@ public static GenericChart DensityMapbox( where TextType : IConvertible => - Plotly.NET.ChartPolar.Chart.ScatterPolar( + Plotly.NET.ChartPolar_Scatter.Chart.ScatterPolar( r: r, theta: theta, mode: mode, @@ -149,7 +149,7 @@ public static GenericChart PointPolar( where TextType : IConvertible => - Plotly.NET.ChartPolar.Chart.PointPolar( + Plotly.NET.ChartPolar_Scatter.Chart.PointPolar( r: r, theta: theta, Name: Name.ToOption(), @@ -230,7 +230,7 @@ public static GenericChart LinePolar( where TextType : IConvertible => - Plotly.NET.ChartPolar.Chart.LinePolar( + Plotly.NET.ChartPolar_Scatter.Chart.LinePolar( r: r, theta: theta, ShowMarkers: ShowMarkers.ToOption(), @@ -319,7 +319,7 @@ public static GenericChart SplinePolar( where TextType : IConvertible => - Plotly.NET.ChartPolar.Chart.SplinePolar( + Plotly.NET.ChartPolar_Scatter.Chart.SplinePolar( r: r, theta: theta, ShowMarkers: ShowMarkers.ToOption(), @@ -397,7 +397,7 @@ public static GenericChart BubblePolar( where TextType : IConvertible => - Plotly.NET.ChartPolar.Chart.BubblePolar( + Plotly.NET.ChartPolar_Scatter.Chart.BubblePolar( r: r, theta: theta, sizes: sizes, @@ -469,7 +469,7 @@ public static GenericChart BarPolar( where TextType : IConvertible => - Plotly.NET.ChartPolar.Chart.BarPolar( + Plotly.NET.ChartPolar_Bar.Chart.BarPolar( r: r, theta: theta, Name: Name.ToOption(), @@ -492,3 +492,4 @@ public static GenericChart BarPolar( ); } } + diff --git a/src/Plotly.NET.CSharp/ChartAPI/ChartSmith.cs b/src/Plotly.NET.CSharp/ChartAPI/ChartSmith.cs index 63d79bd0..8528c9d9 100644 --- a/src/Plotly.NET.CSharp/ChartAPI/ChartSmith.cs +++ b/src/Plotly.NET.CSharp/ChartAPI/ChartSmith.cs @@ -1,4 +1,4 @@ -using Plotly.NET; +using Plotly.NET; using Plotly.NET.LayoutObjects; using Plotly.NET.TraceObjects; using System.Runtime.InteropServices; @@ -70,7 +70,7 @@ public static GenericChart ScatterSmith( where ImagType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartSmith.Chart.ScatterSmith( + Plotly.NET.ChartSmith_Scatter.Chart.ScatterSmith( real: real, imag: imag, mode: mode, @@ -143,7 +143,7 @@ public static GenericChart PointSmith( where ImagType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartSmith.Chart.PointSmith( + Plotly.NET.ChartSmith_Scatter.Chart.PointSmith( real: real, imag: imag, Name: Name.ToOption(), @@ -224,7 +224,7 @@ public static GenericChart LineSmith( where ImagType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartSmith.Chart.LineSmith( + Plotly.NET.ChartSmith_Scatter.Chart.LineSmith( real: real, imag: imag, ShowMarkers: ShowMarkers.ToOption(), @@ -308,7 +308,7 @@ public static GenericChart BubbleSmith( where ImagType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartSmith.Chart.BubbleSmith( + Plotly.NET.ChartSmith_Scatter.Chart.BubbleSmith( real: real, imag: imag, sizes: sizes, @@ -335,3 +335,4 @@ public static GenericChart BubbleSmith( ); } } + diff --git a/src/Plotly.NET.CSharp/ChartAPI/ChartTernary.cs b/src/Plotly.NET.CSharp/ChartAPI/ChartTernary.cs index c795eb73..b79b15ff 100644 --- a/src/Plotly.NET.CSharp/ChartAPI/ChartTernary.cs +++ b/src/Plotly.NET.CSharp/ChartAPI/ChartTernary.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -76,7 +76,7 @@ public static GenericChart ScatterTernary - Plotly.NET.ChartTernary.Chart.ScatterTernary( + Plotly.NET.ChartTernary_Scatter.Chart.ScatterTernary( A: A.ToOption(), B: B.ToOption(), C: C.ToOption(), @@ -155,7 +155,7 @@ public static GenericChart PointTernary( where SumType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartTernary.Chart.PointTernary( + Plotly.NET.ChartTernary_Scatter.Chart.PointTernary( A: A.ToOption(), B: B.ToOption(), C: C.ToOption(), @@ -240,7 +240,7 @@ public static GenericChart LineTernary( where SumType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartTernary.Chart.LineTernary( + Plotly.NET.ChartTernary_Scatter.Chart.LineTernary( A: A.ToOption(), B: B.ToOption(), C: C.ToOption(), @@ -334,7 +334,7 @@ public static GenericChart BubbleTernary where SumType : IConvertible where TextType : IConvertible => - Plotly.NET.ChartTernary.Chart.BubbleTernary( + Plotly.NET.ChartTernary_Scatter.Chart.BubbleTernary( sizes: sizes, A: A.ToOption(), B: B.ToOption(), @@ -363,3 +363,4 @@ public static GenericChart BubbleTernary ); } } + diff --git a/src/Plotly.NET.ImageExport/Playground.fsx b/src/Plotly.NET.ImageExport/Playground.fsx index 8c34a1af..e99ace85 100644 --- a/src/Plotly.NET.ImageExport/Playground.fsx +++ b/src/Plotly.NET.ImageExport/Playground.fsx @@ -139,13 +139,34 @@ #load "GenericChart.fs" #load "Chart.fs" -#load "Chart2D.fs" -#load "Chart3D.fs" -#load "ChartPolar.fs" -#load "ChartMap.fs" -#load "ChartTernary.fs" -#load "ChartCarpet.fs" -#load "ChartDomain.fs" +#load "Chart2D/Chart2D_Scatter.fs" +#load "Chart2D/Chart2D_Area.fs" +#load "Chart2D/Chart2D_Funnel.fs" +#load "Chart2D/Chart2D_Bar.fs" +#load "Chart2D/Chart2D_Histogram.fs" +#load "Chart2D/Chart2D_Distribution.fs" +#load "Chart2D/Chart2D_Heatmap.fs" +#load "Chart2D/Chart2D_Finance.fs" +#load "Chart2D/Chart2D_Splom.fs" +#load "Chart2D/Chart2D_Statistical.fs" +#load "Chart3D/Chart3D_Scatter.fs" +#load "Chart3D/Chart3D_Surface.fs" +#load "Chart3D/Chart3D_VectorField.fs" +#load "Chart3D/Chart3D_Volume.fs" +#load "ChartPolar/ChartPolar_Scatter.fs" +#load "ChartPolar/ChartPolar_Bar.fs" +#load "ChartMap/ChartMap_Geo.fs" +#load "ChartMap/ChartMap_Mapbox.fs" +#load "ChartMap/ChartMap_Density.fs" +#load "ChartTernary/ChartTernary_Scatter.fs" +#load "ChartCarpet/ChartCarpet_Base.fs" +#load "ChartCarpet/ChartCarpet_Scatter.fs" +#load "ChartCarpet/ChartCarpet_Contour.fs" +#load "ChartDomain/ChartDomain_Pie.fs" +#load "ChartDomain/ChartDomain_Hierarchy.fs" +#load "ChartDomain/ChartDomain_Relations.fs" +#load "ChartDomain/ChartDomain_Table.fs" +#load "ChartDomain/ChartDomain_Icicle.fs" #I "../Plotly.NET/CSharpLayer" diff --git a/src/Plotly.NET/ChartAPI/Chart2D.fs b/src/Plotly.NET/ChartAPI/Chart2D.fs deleted file mode 100644 index 440b1271..00000000 --- a/src/Plotly.NET/ChartAPI/Chart2D.fs +++ /dev/null @@ -1,9234 +0,0 @@ -namespace Plotly.NET - -open Plotly.NET.LayoutObjects -open Plotly.NET.TraceObjects - -open DynamicObj -open System -open System.IO -open System.Runtime.CompilerServices - -open System.Runtime.InteropServices - -[] -module Chart2D = - [] - type Chart = - [] - static member internal renderScatterTrace (useDefaults: bool) (useWebGL: bool) (style: Trace2D -> Trace2D) = - if useWebGL then - Trace2D.initScatterGL style |> GenericChart.ofTraceObject useDefaults - else - Trace2D.initScatter style |> GenericChart.ofTraceObject useDefaults - - [] - static member internal renderHeatmapTrace (useDefaults: bool) (useWebGL: bool) (style: Trace2D -> Trace2D) = - if useWebGL then - Trace2D.initHeatmapGL style |> GenericChart.ofTraceObject useDefaults - else - Trace2D.initHeatmap style |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a Scatter plot. - /// - /// Scatter charts are the basis of Point, Line, and Bubble Charts, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble - /// - /// Sets the x coordinates of the plotted data. - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the x coordinates of the plotted data. Use two inner arrays here to plot multicategorial data - /// Sets the y coordinates of the plotted data. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Sets the x coordinates of the plotted data. Use two inner arrays here to plot multicategorial data - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the pattern within the marker. - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Scatter - ( - ?X: seq<#IConvertible>, - ?XEncoded: EncodedTypedArray, - ?MultiX: seq>, - ?Y: seq<#IConvertible>, - ?YEncoded: EncodedTypedArray, - ?MultiY: seq>, - ?Mode: StyleParam.Mode, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?Fill: StyleParam.Fill, - ?FillColor: Color, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity - ) - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Dash = LineDash, - ?Colorscale = LineColorScale, - ?Width = LineWidth - ) - - let style = - Trace2DStyle.Scatter( - ?X = X, - ?XEncoded = XEncoded, - ?MultiX = MultiX, - ?Y = Y, - ?YEncoded = YEncoded, - ?MultiY = MultiY, - ?Mode = Mode, - Marker = marker, - Line = line, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?Fill = Fill, - ?FillColor = FillColor, - ?FillPattern = FillPattern - ) - - let useWebGL = defaultArg UseWebGL false - - Chart.renderScatterTrace useDefaults useWebGL style - - /// - /// Creates a Scatter plot from encoded x and y coordinates. - /// - /// Scatter charts are the basis of Point, Line, and Bubble Charts, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble - /// - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the pattern within the marker. - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Scatter - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - mode: StyleParam.Mode, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?Fill: StyleParam.Fill, - ?FillColor: Color, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - Chart.Scatter( - XEncoded = xEncoded, - YEncoded = yEncoded, - Mode = mode, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?Fill = Fill, - ?FillColor = FillColor, - ?FillPattern = FillPattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a Scatter plot. - /// - /// Scatter charts are the basis of Point, Line, and Bubble Charts, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the pattern within the marker. - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Scatter - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - mode: StyleParam.Mode, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?Fill: StyleParam.Fill, - ?FillColor: Color, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - Chart.Scatter( - X = x, - Y = y, - Mode = mode, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?Fill = Fill, - ?FillColor = FillColor, - ?FillPattern = FillPattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a Scatter chart. Scatter charts are the basis of Point, Line, and Bubble Charts in Plotly, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble - /// - /// Sets the x and y coordinates of the plotted data. - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the pattern within the marker. - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Scatter - ( - xy: seq<#IConvertible * #IConvertible>, - mode: StyleParam.Mode, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?Fill: StyleParam.Fill, - ?FillColor: Color, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let x, y = Seq.unzip xy - - Chart.Scatter( - x = x, - y = y, - mode = mode, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?Fill = Fill, - ?FillColor = FillColor, - ?FillPattern = FillPattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a Point chart, which uses Points in a 2D space to visualize data. - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Point - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - // if text position or font is set, then show labels (not only when hovering) - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - Chart.Scatter( - X = x, - Y = y, - Mode = changeMode StyleParam.Mode.Markers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a Point chart from encoded x and y coordinates. - /// - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Point - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - Chart.Scatter( - XEncoded = xEncoded, - YEncoded = yEncoded, - Mode = changeMode StyleParam.Mode.Markers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - - /// Creates a Point chart, which uses Points in a 2D space to visualize data. - /// Sets the x and y coordinates of the plotted data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Point - ( - xy: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - let x, y = Seq.unzip xy - - Chart.Point( - x = x, - y = y, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - - /// Creates a Line chart, which uses a Line plotted between the given datums in a 2D space to visualize typically an evolution of Y depending on X. - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Whether to show markers for the individual data points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the pattern within the marker. - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Line - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?Fill: StyleParam.Fill, - ?FillColor: Color, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - // if text position or font is set than show labels (not only when hovering) - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - Chart.Scatter( - X = x, - Y = y, - Mode = changeMode StyleParam.Mode.Lines, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?Fill = Fill, - ?FillColor = FillColor, - ?FillPattern = FillPattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - - ) - - /// Creates a Line chart from encoded x and y coordinates. - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Whether to show markers for the individual data points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces linked to the same position axis or matching axes to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the pattern within the marker. - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Line - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?Fill: StyleParam.Fill, - ?FillColor: Color, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - Chart.Scatter( - XEncoded = xEncoded, - YEncoded = yEncoded, - Mode = changeMode StyleParam.Mode.Lines, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?Fill = Fill, - ?FillColor = FillColor, - ?FillPattern = FillPattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - - ) - - - - /// Creates a Line chart, which uses a Line plotted between the given datums in a 2D space to visualize typically an evolution of Y depending on X. - /// Sets the x,y coordinates of the plotted data. - /// Whether to show markers for the individual data points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the pattern within the marker. - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Line - ( - xy: seq<#IConvertible * #IConvertible>, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?Fill: StyleParam.Fill, - ?FillColor: Color, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - let x, y = Seq.unzip xy - - Chart.Line( - x = x, - y = y, - ?ShowMarkers = ShowMarkers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?Fill = Fill, - ?FillColor = FillColor, - ?FillPattern = FillPattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - - /// Creates a Spline chart. A spline chart is a line chart in which data points are connected by smoothed curves: this modification is aimed to improve the design of a chart. - /// Very similar to Line Plots, spline charts are typically used to visualize an evolution of Y depending on X. - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Whether to show markers for the individual data points - /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the pattern within the marker. - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Spline - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?ShowMarkers: bool, - ?Smoothing: float, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?Fill: StyleParam.Fill, - ?FillColor: Color, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - // if text position set then show labels (not only when hovering) - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity - ) - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Dash = LineDash, - ?Colorscale = LineColorScale, - ?Width = LineWidth, - Shape = StyleParam.Shape.Spline, - ?Smoothing = Smoothing - - ) - - let style = - Trace2DStyle.Scatter( - X = x, - Y = y, - Mode = changeMode StyleParam.Mode.Lines, - Marker = marker, - Line = line, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?Fill = Fill, - ?FillColor = FillColor, - ?FillPattern = FillPattern - ) - - let useWebGL = defaultArg UseWebGL false - - Chart.renderScatterTrace useDefaults useWebGL style - - /// - /// Creates a Spline chart from encoded x and y coordinates. - /// - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Whether to show markers for the individual data points - /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the pattern within the marker. - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Spline - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?ShowMarkers: bool, - ?Smoothing: float, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?Fill: StyleParam.Fill, - ?FillColor: Color, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity - ) - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Dash = LineDash, - ?Colorscale = LineColorScale, - ?Width = LineWidth, - Shape = StyleParam.Shape.Spline, - ?Smoothing = Smoothing - - ) - - let style = - Trace2DStyle.Scatter( - XEncoded = xEncoded, - YEncoded = yEncoded, - Mode = changeMode StyleParam.Mode.Lines, - Marker = marker, - Line = line, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?Fill = Fill, - ?FillColor = FillColor, - ?FillPattern = FillPattern - ) - - let useWebGL = defaultArg UseWebGL false - - Chart.renderScatterTrace useDefaults useWebGL style - - - /// - /// Creates a Spline chart. A spline chart is a line chart in which data points are connected by smoothed curves: this modification is aimed to improve the design of a chart. - /// Very similar to Line Plots, spline charts are typically used to visualize an evolution of Y depending on X. - /// - /// Sets the x,y coordinates of the plotted data. - /// Whether to show markers for the individual data points - /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the pattern within the marker. - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Spline - ( - xy: seq<#IConvertible * #IConvertible>, - ?ShowMarkers: bool, - ?Smoothing: float, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?Fill: StyleParam.Fill, - ?FillColor: Color, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - let x, y = Seq.unzip xy - - Chart.Spline( - x = x, - y = y, - ?ShowMarkers = ShowMarkers, - ?Smoothing = Smoothing, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?Fill = Fill, - ?FillColor = FillColor, - ?FillPattern = FillPattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - - ) - - - /// Creates a bubble chart. A bubble chart is a variation of the Point chart, where the data points get an additional scale by being rendered as bubbles of different sizes. - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Sets the bubble size of the plotted data - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Bubble - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - sizes: seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - // if text position or font is set than show labels (not only when hovering) - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity, - MultiSize = sizes - ) - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Dash = LineDash, - ?Colorscale = LineColorScale, - ?Width = LineWidth - ) - - let style = - Trace2DStyle.Scatter( - X = x, - Y = y, - Mode = changeMode StyleParam.Mode.Markers, - Marker = marker, - Line = line, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm - ) - - let useWebGL = defaultArg UseWebGL false - - Chart.renderScatterTrace useDefaults useWebGL style - - /// Creates a bubble chart from encoded x and y coordinates. - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Sets the bubble sizes of the plotted data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Bubble - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - sizes: seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity, - MultiSize = sizes - ) - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Dash = LineDash, - ?Colorscale = LineColorScale, - ?Width = LineWidth - ) - - let style = - Trace2DStyle.Scatter( - XEncoded = xEncoded, - YEncoded = yEncoded, - Mode = changeMode StyleParam.Mode.Markers, - Marker = marker, - Line = line, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm - ) - - let useWebGL = defaultArg UseWebGL false - - Chart.renderScatterTrace useDefaults useWebGL style - - /// Creates a bubble chart. A bubble chart is a variation of the Point chart, where the data points get an additional scale by being rendered as bubbles of different sizes. - /// Sets the x coordinates, y coordinates, and bubble sizes of the plotted data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Bubble - ( - xysizes: seq<#IConvertible * #IConvertible * int>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - let x, y, sizes = Seq.unzip3 xysizes - - Chart.Bubble( - x = x, - y = y, - sizes = sizes, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - - ) - - /// - /// Displays a range of data by plotting three Y values per data point (upper, mid, lower). - /// - /// The mid Y value usually resembles some kind of central tendency and the upper/lower Y values some kind of spread. - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data for the mid Y value. - /// Sets the y coordinates of the plotted data for the upper Y value. - /// Sets the y coordinates of the plotted data for the lower Y value. - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name of the mid Y values. The trace name appear as the legend item and on hover - /// Sets the name of the legendgroup for the three traces of this plot. - /// Determines whether or not an To show markers for each datum. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum for the mid Y values. - /// Sets individual text for each datum for the mid Y values. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker for the mid Y values. - /// Sets the colorscale of the marker for the mid Y values. - /// Sets the outline of the marker for the mid Y values. - /// Sets the marker symbol for each datum for the mid Y values. - /// Sets the marker symbol for each individual datum for the mid Y values. - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the mid Y values. - /// Sets the color of the line for the mid Y values. - /// Sets the colorscale of the line for the mid Y values. - /// Sets the width of the line for the mid Y values. - /// sets the drawing style of the line for the mid Y values. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the mid Y values. - /// Sets the color of the range between upper and lower Y values. - /// Sets the pattern of the range between upper and lower Y values. - /// Sets a text associated with each datum for the upper Y values. - /// Sets individual text for each datum for the upper Y values. - /// Sets a text associated with each datum for the lower Y values. - /// Sets individual text for each datum for the lower Y values. - /// Sets the text font for all Text items - /// Sets the name of the lower Y value trace. - /// Sets the line for the lower Y values. - /// Sets the marker for the lower Y values. - /// Sets the name of the uper Y value trace. - /// Sets the line for the upper Y values. - /// Sets the marker for the upper Y values. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Range - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - upper: seq<#IConvertible>, - lower: seq<#IConvertible>, - mode: StyleParam.Mode, - ?Name: string, - ?GroupName: string, - ?ShowMarkers: bool, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?UpperMarker: Marker, - ?LowerMarker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?UpperLine: Line, - ?LowerLine: Line, - ?RangeColor: Color, - ?RangePattern: Pattern, - ?UpperText: #IConvertible, - ?MultiUpperText: seq<#IConvertible>, - ?LowerText: #IConvertible, - ?MultiLowerText: seq<#IConvertible>, - ?TextFont: Font, - ?LowerName: string, - ?UpperName: string, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let upperName = defaultArg UpperName "upper" - let lowerName = defaultArg LowerName "lower" - - // if text position or font is set than show labels (not only when hovering) - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || TextFont.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - let trace = - Chart.Scatter( - X = x, - Y = y, - Mode = changeMode mode, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line - ) - |> GenericChart.mapTrace ( - Trace2DStyle.Scatter( - LegendGroup = (defaultArg GroupName "Range"), - LegendGroupTitle = (Title.init (Text = (defaultArg GroupName "Range"))) - ) - ) - - let lower = - Trace2D.initScatter ( - Trace2DStyle.Scatter( - X = x, - Y = lower, - Mode = changeMode mode, - ?FillColor = RangeColor, - ?Name = Some lowerName, - ShowLegend = (defaultArg ShowLegend true), - ?Text = LowerText, - ?MultiText = MultiLowerText, - ?TextPosition = TextPosition, - ?TextFont = TextFont, - ?Marker = LowerMarker, - ?Line = LowerLine, - LegendGroup = (defaultArg GroupName "Range") - ) - ) - |> TraceStyle.Marker( - Color = - if RangeColor.IsSome then - RangeColor.Value - else - (Plotly.NET.Color.fromString "rgba(0,0,0,0.5)") - ) - - let upper = - Trace2D.initScatter ( - Trace2DStyle.Scatter( - X = x, - Y = upper, - Mode = changeMode mode, - Fill = StyleParam.Fill.ToNext_y, - ?FillColor = RangeColor, - ?FillPattern = RangePattern, - ?Name = Some upperName, - ShowLegend = (defaultArg ShowLegend true), - ?Text = UpperText, - ?MultiText = MultiUpperText, - ?TextPosition = TextPosition, - ?TextFont = TextFont, - ?Marker = UpperMarker, - ?Line = UpperLine, - LegendGroup = (defaultArg GroupName "Range") - ) - ) - |> TraceStyle.Marker( - Color = - if RangeColor.IsSome then - RangeColor.Value - else - (Plotly.NET.Color.fromString "rgba(0,0,0,0.5)") - ) - - GenericChart.ofTraceObjects - useDefaults - [ - lower - upper - yield! (GenericChart.getTraces trace) - ] - - /// - /// Displays a range of data from encoded x and y coordinates by plotting three encoded Y values per data point (upper, mid, lower). - /// - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data for the mid Y values as an encoded typed array. - /// Sets the y coordinates of the plotted data for the upper Y value as an encoded typed array. - /// Sets the y coordinates of the plotted data for the lower Y value as an encoded typed array. - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the name of the legendgroup for the three traces of this plot. - /// Determines whether or not an To show markers for each datum. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum for the mid Y values. - /// Sets individual text for each datum for the mid Y values. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker for the mid Y values. - /// Sets the colorscale of the marker for the mid Y values. - /// Sets the outline of the marker for the mid Y values. - /// Sets the marker symbol for each datum for the mid Y values. - /// Sets the marker symbol for each individual datum for the mid Y values. - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the mid Y values. - /// Sets the color of the line for the mid Y values. - /// Sets the colorscale of the line for the mid Y values. - /// Sets the width of the line for the mid Y values. - /// sets the drawing style of the line for the mid Y values. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the mid Y values. - /// Sets the color of the range between upper and lower Y values. - /// Sets the pattern of the range between upper and lower Y values. - /// Sets a text associated with each datum for the upper Y values. - /// Sets individual text for each datum for the upper Y values. - /// Sets a text associated with each datum for the lower Y values. - /// Sets individual text for each datum for the lower Y values. - /// Sets the text font for all Text items - /// Sets the name of the lower Y value trace. - /// Sets the line for the lower Y values. - /// Sets the marker for the lower Y values. - /// Sets the name of the uper Y value trace. - /// Sets the line for the upper Y values. - /// Sets the marker for the upper Y values. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Range - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - upperEncoded: EncodedTypedArray, - lowerEncoded: EncodedTypedArray, - mode: StyleParam.Mode, - ?Name: string, - ?GroupName: string, - ?ShowMarkers: bool, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?UpperMarker: Marker, - ?LowerMarker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?UpperLine: Line, - ?LowerLine: Line, - ?RangeColor: Color, - ?RangePattern: Pattern, - ?UpperText: #IConvertible, - ?MultiUpperText: seq<#IConvertible>, - ?LowerText: #IConvertible, - ?MultiLowerText: seq<#IConvertible>, - ?TextFont: Font, - ?LowerName: string, - ?UpperName: string, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let upperName = defaultArg UpperName "upper" - let lowerName = defaultArg LowerName "lower" - - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || TextFont.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - let trace = - Chart.Scatter( - XEncoded = xEncoded, - YEncoded = yEncoded, - Mode = changeMode mode, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line - ) - |> GenericChart.mapTrace ( - Trace2DStyle.Scatter( - LegendGroup = (defaultArg GroupName "Range"), - LegendGroupTitle = (Title.init (Text = (defaultArg GroupName "Range"))) - ) - ) - - let lower = - Trace2D.initScatter ( - Trace2DStyle.Scatter( - XEncoded = xEncoded, - YEncoded = lowerEncoded, - Mode = changeMode mode, - ?FillColor = RangeColor, - ?Name = Some lowerName, - ShowLegend = (defaultArg ShowLegend true), - ?Text = LowerText, - ?MultiText = MultiLowerText, - ?TextPosition = TextPosition, - ?TextFont = TextFont, - ?Marker = LowerMarker, - ?Line = LowerLine, - LegendGroup = (defaultArg GroupName "Range") - ) - ) - |> TraceStyle.Marker( - Color = - if RangeColor.IsSome then - RangeColor.Value - else - (Plotly.NET.Color.fromString "rgba(0,0,0,0.5)") - ) - - let upper = - Trace2D.initScatter ( - Trace2DStyle.Scatter( - XEncoded = xEncoded, - YEncoded = upperEncoded, - Mode = changeMode mode, - Fill = StyleParam.Fill.ToNext_y, - ?FillColor = RangeColor, - ?FillPattern = RangePattern, - ?Name = Some upperName, - ShowLegend = (defaultArg ShowLegend true), - ?Text = UpperText, - ?MultiText = MultiUpperText, - ?TextPosition = TextPosition, - ?TextFont = TextFont, - ?Marker = UpperMarker, - ?Line = UpperLine, - LegendGroup = (defaultArg GroupName "Range") - ) - ) - |> TraceStyle.Marker( - Color = - if RangeColor.IsSome then - RangeColor.Value - else - (Plotly.NET.Color.fromString "rgba(0,0,0,0.5)") - ) - - GenericChart.ofTraceObjects - useDefaults - [ - lower - upper - yield! (GenericChart.getTraces trace) - ] - - /// - /// Displays a range of data by plotting three Y values per data point (upper, mid, lower). - /// - /// The mid Y value usually resembles some kind of central tendency and the upper/lower Y values some kind of spread. - /// - /// Sets the x and y coordinates of the plotted data (x is used for all y data, the y coordinates are those of the mod values). - /// Sets the y coordinates of the plotted data for the upper Y value. - /// Sets the y coordinates of the plotted data for the lower Y value. - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the name of the legendgroup for the three traces of this plot. - /// Determines whether or not an To show markers for each datum. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum for the mid Y values. - /// Sets individual text for each datum for the mid Y values. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker for the mid Y values. - /// Sets the colorscale of the marker for the mid Y values. - /// Sets the outline of the marker for the mid Y values. - /// Sets the marker symbol for each datum for the mid Y values. - /// Sets the marker symbol for each individual datum for the mid Y values. - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the mid Y values. - /// Sets the color of the line for the mid Y values. - /// Sets the colorscale of the line for the mid Y values. - /// Sets the width of the line for the mid Y values. - /// sets the drawing style of the line for the mid Y values. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the mid Y values. - /// Sets the color of the range between upper and lower Y values. - /// Sets the pattern of the range between upper and lower Y values. - /// Sets a text associated with each datum for the upper Y values. - /// Sets individual text for each datum for the upper Y values. - /// Sets a text associated with each datum for the lower Y values. - /// Sets individual text for each datum for the lower Y values. - /// Sets the text font for all Text items - /// Sets the name of the lower Y value trace. - /// Sets the line for the lower Y values. - /// Sets the marker for the lower Y values. - /// Sets the name of the uper Y value trace. - /// Sets the line for the upper Y values. - /// Sets the marker for the upper Y values. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Range - ( - xy: seq<#IConvertible * #IConvertible>, - upper: seq<#IConvertible>, - lower: seq<#IConvertible>, - mode: StyleParam.Mode, - ?Name: string, - ?GroupName: string, - ?ShowMarkers: bool, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?UpperMarker: Marker, - ?LowerMarker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?UpperLine: Line, - ?LowerLine: Line, - ?RangeColor: Color, - ?RangePattern: Pattern, - ?UpperText: #IConvertible, - ?MultiUpperText: seq<#IConvertible>, - ?LowerText: #IConvertible, - ?MultiLowerText: seq<#IConvertible>, - ?TextFont: Font, - ?LowerName: string, - ?UpperName: string, - ?UseDefaults: bool - ) = - let x, y = Seq.unzip xy - - Chart.Range( - x = x, - y = y, - upper = upper, - lower = lower, - mode = mode, - ?Name = Name, - ?GroupName = GroupName, - ?ShowMarkers = ShowMarkers, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?UpperMarker = UpperMarker, - ?LowerMarker = LowerMarker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?UpperLine = UpperLine, - ?LowerLine = LowerLine, - ?RangeColor = RangeColor, - ?RangePattern = RangePattern, - ?UpperText = UpperText, - ?MultiUpperText = MultiUpperText, - ?LowerText = LowerText, - ?MultiLowerText = MultiLowerText, - ?TextFont = TextFont, - ?LowerName = LowerName, - ?UpperName = UpperName, - ?UseDefaults = UseDefaults - ) - - /// Creates an Area chart, which uses a Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Whether to show markers for the individual data points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets a pattern shape for the area fill - /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Area - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?FillColor: Color, - ?FillPatternShape: StyleParam.PatternShape, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let fillpattern = - FillPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = FillPatternShape) - - Chart.Line( - x = x, - y = y, - Fill = StyleParam.Fill.ToZero_y, - ?ShowMarkers = ShowMarkers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - FillPattern = fillpattern, - ?FillColor = FillColor, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - /// Creates an Area chart from encoded x and y coordinates. - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Whether to show markers for the individual data points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets a pattern shape for the area fill - /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Area - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?FillColor: Color, - ?FillPatternShape: StyleParam.PatternShape, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let fillpattern = - FillPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = FillPatternShape) - - Chart.Line( - xEncoded = xEncoded, - yEncoded = yEncoded, - Fill = StyleParam.Fill.ToZero_y, - ?ShowMarkers = ShowMarkers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - FillPattern = fillpattern, - ?FillColor = FillColor, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - - - /// Creates an Area chart, which uses a Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. - /// Sets the x and y coordinates of the plotted data. - /// Whether to show markers for the individual data points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets a pattern shape for the area fill - /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Area - ( - xy: seq<#IConvertible * #IConvertible>, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?FillColor: Color, - ?FillPatternShape: StyleParam.PatternShape, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let x, y = Seq.unzip xy - - Chart.Area( - x = x, - y = y, - ?ShowMarkers = ShowMarkers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?FillColor = FillColor, - ?FillPatternShape = FillPatternShape, - ?FillPattern = FillPattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - - /// Creates a Spline area chart, which uses a smoothed Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Whether to show markers for the individual data points - /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets a pattern shape for the area fill - /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member SplineArea - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?ShowMarkers: bool, - ?Smoothing: float, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?FillColor: Color, - ?FillPatternShape: StyleParam.PatternShape, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let fillpattern = - FillPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = FillPatternShape) - - Chart.Spline( - x = x, - y = y, - Fill = StyleParam.Fill.ToZero_y, - ?ShowMarkers = ShowMarkers, - ?Smoothing = Smoothing, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?FillColor = FillColor, - FillPattern = fillpattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - - ) - - /// Creates a Spline area chart from encoded x and y coordinates. - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Whether to show markers for the individual data points - /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets a pattern shape for the area fill - /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member SplineArea - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?ShowMarkers: bool, - ?Smoothing: float, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?FillColor: Color, - ?FillPatternShape: StyleParam.PatternShape, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let fillpattern = - FillPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = FillPatternShape) - - Chart.Spline( - xEncoded = xEncoded, - yEncoded = yEncoded, - Fill = StyleParam.Fill.ToZero_y, - ?ShowMarkers = ShowMarkers, - ?Smoothing = Smoothing, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?FillColor = FillColor, - FillPattern = fillpattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - - ) - - /// Creates a Spline area chart, which uses a smoothed Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. - /// Sets the x and y coordinates of the plotted data. - /// Whether to show markers for the individual data points - /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// 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. - /// 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. - /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets a pattern shape for the area fill - /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - static member SplineArea - ( - xy: seq<#IConvertible * #IConvertible>, - ?ShowMarkers: bool, - ?Smoothing: float, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?StackGroup: string, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?FillColor: Color, - ?FillPatternShape: StyleParam.PatternShape, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let x, y = Seq.unzip xy - - Chart.SplineArea( - x = x, - y = y, - ?ShowMarkers = ShowMarkers, - ?Smoothing = Smoothing, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?StackGroup = StackGroup, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?FillColor = FillColor, - ?FillPatternShape = FillPatternShape, - ?FillPattern = FillPattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - /// Creates a stacked Area chart, which uses a Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. Multiple Charts of this type are stacked on top of each others y dimensions - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Whether to show markers for the individual data points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets a pattern shape for the area fill - /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member StackedArea - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?FillColor: Color, - ?FillPatternShape: StyleParam.PatternShape, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let fillpattern = - FillPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = FillPatternShape) - - Chart.Line( - x = x, - y = y, - Fill = StyleParam.Fill.ToNext_y, - ?ShowMarkers = ShowMarkers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - StackGroup = "stackedarea", - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?FillColor = FillColor, - FillPattern = fillpattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - /// Creates a stacked Area chart from encoded x and y coordinates. - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Whether to show markers for the individual data points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets a pattern shape for the area fill - /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member StackedArea - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?FillColor: Color, - ?FillPatternShape: StyleParam.PatternShape, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let fillpattern = - FillPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = FillPatternShape) - - Chart.Line( - xEncoded = xEncoded, - yEncoded = yEncoded, - Fill = StyleParam.Fill.ToNext_y, - ?ShowMarkers = ShowMarkers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - StackGroup = "stackedarea", - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?FillColor = FillColor, - FillPattern = fillpattern, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - /// Creates a stacked Area chart, which uses a Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. Multiple Charts of this type are stacked on top of each others y dimensions - /// Sets the x and y coordinates of the plotted data. - /// Whether to show markers for the individual data points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. - /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets a pattern shape for the area fill - /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). - /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member StackedArea - ( - xy: seq<#IConvertible * #IConvertible>, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?Orientation: StyleParam.Orientation, - ?GroupNorm: StyleParam.GroupNorm, - ?FillColor: Color, - ?FillPatternShape: StyleParam.PatternShape, - ?FillPattern: Pattern, - ?UseWebGL: bool, - ?UseDefaults: bool - ) = - - let x, y = Seq.unzip xy - - Chart.StackedArea( - x = x, - y = y, - ?ShowMarkers = ShowMarkers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?Orientation = Orientation, - ?GroupNorm = GroupNorm, - ?FillPatternShape = FillPatternShape, - ?FillPattern = FillPattern, - ?FillColor = FillColor, - ?UseWebGL = UseWebGL, - ?UseDefaults = UseDefaults - ) - - - /// - /// Creates a Funnel chart. - /// - /// Funnel charts visualize stages in a process using length-encoded bars. This trace can be used to show data in either a part-to-whole representation wherein each item appears in a single stage, or in a "drop-off" representation wherein each item appears in each stage it traversed. See also the "funnelarea" trace type for a different approach to visualizing funnel data. - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the bar width (in position axis units). - /// 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. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. - /// 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. - /// 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. - /// Sets the color of the bars. - /// Sets the color of the bar outline. - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Determines which trace information appear on the graph. In the case of having multiple funnels, percentages and totals are computed separately (per trace). - /// Sets the line color of the funnel connector - /// Sets the line style of the funnel connector - /// Sets the fill color of the funnel connector - /// Sets the line of the funnel connector (use this for more finegrained control than the other connector line associated arguments). - /// Sets the funnel connector (use this for more finegrained control than the other connector-associated arguments). - /// Sets the font used for `text` lying inside the bar. - /// Sets the font used for `text` lying outside the bar. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Funnel - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Width: float, - ?Offset: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?Orientation: StyleParam.Orientation, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?MarkerColor: Color, - ?MarkerOutline: Line, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?ConnectorLineColor: Color, - ?ConnectorLineStyle: StyleParam.DrawingStyle, - ?ConnectorFillColor: Color, - ?ConnectorLine: Line, - ?Connector: FunnelConnector, - ?InsideTextFont: Font, - ?OutsideTextFont: Font, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style (?Color = MarkerColor, ?Outline = MarkerOutline) - - let connectorLine = - ConnectorLine - |> Option.map (Plotly.NET.Line.style (?Color = ConnectorLineColor, ?Dash = ConnectorLineStyle)) - - let connector = - Connector - |> Option.defaultValue (TraceObjects.FunnelConnector.init ()) - |> TraceObjects.FunnelConnector.style (?FillColor = ConnectorFillColor, ?Line = connectorLine) - - Trace2D.initFunnel ( - Trace2DStyle.Funnel( - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - X = x, - Y = y, - ?Width = Width, - ?Offset = Offset, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Orientation = Orientation, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - Marker = marker, - ?TextInfo = TextInfo, - Connector = connector, - ?InsideTextFont = InsideTextFont, - ?OutsideTextFont = OutsideTextFont - - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a Funnel chart from encoded x and y coordinates. - /// - /// Funnel charts visualize stages in a process using length-encoded bars. This trace can be used to show data in either a part-to-whole representation wherein each item appears in a single stage, or in a "drop-off" representation wherein each item appears in each stage it traversed. See also the "funnelarea" trace type for a different approach to visualizing funnel data. - /// - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the bar width (in position axis units). - /// 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. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. - /// 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. - /// 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. - /// Sets the color of the bars. - /// Sets the color of the bar outline. - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Determines which trace information appear on the graph. In the case of having multiple funnels, percentages and totals are computed separately (per trace). - /// Sets the line color of the funnel connector - /// Sets the line style of the funnel connector - /// Sets the fill color of the funnel connector - /// Sets the line of the funnel connector (use this for more finegrained control than the other connector line associated arguments). - /// Sets the funnel connector (use this for more finegrained control than the other connector-associated arguments). - /// Sets the font used for `text` lying inside the bar. - /// Sets the font used for `text` lying outside the bar. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Funnel - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Width: float, - ?Offset: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?Orientation: StyleParam.Orientation, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?MarkerColor: Color, - ?MarkerOutline: Line, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?ConnectorLineColor: Color, - ?ConnectorLineStyle: StyleParam.DrawingStyle, - ?ConnectorFillColor: Color, - ?ConnectorLine: Line, - ?Connector: FunnelConnector, - ?InsideTextFont: Font, - ?OutsideTextFont: Font, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style (?Color = MarkerColor, ?Outline = MarkerOutline) - - let connectorLine = - ConnectorLine - |> Option.map (Plotly.NET.Line.style (?Color = ConnectorLineColor, ?Dash = ConnectorLineStyle)) - - let connector = - Connector - |> Option.defaultValue (TraceObjects.FunnelConnector.init ()) - |> TraceObjects.FunnelConnector.style (?FillColor = ConnectorFillColor, ?Line = connectorLine) - - Trace2D.initFunnel ( - Trace2DStyle.Funnel( - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - XEncoded = xEncoded, - YEncoded = yEncoded, - ?Width = Width, - ?Offset = Offset, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Orientation = Orientation, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - Marker = marker, - ?TextInfo = TextInfo, - Connector = connector, - ?InsideTextFont = InsideTextFont, - ?OutsideTextFont = OutsideTextFont - - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a stacked Funnel chart, a variation of the funnel chart where multiple funnel bars of each stage are stacked on top of each other. - /// To create this type of chart, combine multiple of these charts via `Chart.combine`. - /// - /// Funnel charts visualize stages in a process using length-encoded bars. This trace can be used to show data in either a part-to-whole representation wherein each item appears in a single stage, or in a "drop-off" representation wherein each item appears in each stage it traversed. See also the "funnelarea" trace type for a different approach to visualizing funnel data. - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the bar width (in position axis units). - /// 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. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. - /// 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. - /// 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. - /// Sets the color of the bars. - /// Sets the color of the bar outline. - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Determines which trace information appear on the graph. In the case of having multiple funnels, percentages and totals are computed separately (per trace). - /// Sets the line color of the funnel connector - /// Sets the line style of the funnel connector - /// Sets the fill color of the funnel connector - /// Sets the line of the funnel connector (use this for more finegrained control than the other connector line associated arguments). - /// Sets the funnel connector (use this for more finegrained control than the other connector-associated arguments). - /// Sets the font used for `text` lying inside the bar. - /// Sets the font used for `text` lying outside the bar. - /// If set to false, ignore the global default settings set in `Defaults` - static member StackedFunnel - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Width: float, - ?Offset: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?Orientation: StyleParam.Orientation, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?MarkerColor: Color, - ?MarkerOutline: Line, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?ConnectorLineColor: Color, - ?ConnectorLineStyle: StyleParam.DrawingStyle, - ?ConnectorFillColor: Color, - ?ConnectorLine: Line, - ?Connector: FunnelConnector, - ?InsideTextFont: Font, - ?OutsideTextFont: Font, - ?UseDefaults: bool - ) = - Chart.Funnel( - x = x, - y = y, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Width = Width, - ?Offset = Offset, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Orientation = Orientation, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?MarkerColor = MarkerColor, - ?MarkerOutline = MarkerOutline, - ?Marker = Marker, - ?TextInfo = TextInfo, - ?ConnectorLineColor = ConnectorLineColor, - ?ConnectorLineStyle = ConnectorLineStyle, - ?ConnectorFillColor = ConnectorFillColor, - ?ConnectorLine = ConnectorLine, - ?Connector = Connector, - ?InsideTextFont = InsideTextFont, - ?OutsideTextFont = OutsideTextFont, - ?UseDefaults = UseDefaults - - ) - |> GenericChart.mapLayout (Layout.style (FunnelMode = StyleParam.FunnelMode.Stack)) - - /// Creates a stacked funnel chart from encoded x and y coordinates. - [] - static member StackedFunnel - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Width: float, - ?Offset: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?Orientation: StyleParam.Orientation, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?MarkerColor: Color, - ?MarkerOutline: Line, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?ConnectorLineColor: Color, - ?ConnectorLineStyle: StyleParam.DrawingStyle, - ?ConnectorFillColor: Color, - ?ConnectorLine: Line, - ?Connector: FunnelConnector, - ?InsideTextFont: Font, - ?OutsideTextFont: Font, - ?UseDefaults: bool - ) = - Chart.Funnel( - xEncoded = xEncoded, - yEncoded = yEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Width = Width, - ?Offset = Offset, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Orientation = Orientation, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?MarkerColor = MarkerColor, - ?MarkerOutline = MarkerOutline, - ?Marker = Marker, - ?TextInfo = TextInfo, - ?ConnectorLineColor = ConnectorLineColor, - ?ConnectorLineStyle = ConnectorLineStyle, - ?ConnectorFillColor = ConnectorFillColor, - ?ConnectorLine = ConnectorLine, - ?Connector = Connector, - ?InsideTextFont = InsideTextFont, - ?OutsideTextFont = OutsideTextFont, - ?UseDefaults = UseDefaults - ) - |> GenericChart.mapLayout (Layout.style (FunnelMode = StyleParam.FunnelMode.Stack)) - - /// - /// Creates a waterfall chart. - /// - /// Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the color of increasing values - /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of decreasing values - /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of total values - /// Sets the style options of total values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units). - /// Sets the individual bar width of each datum (in position axis units). - /// Sets the opacity of the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the font used for `text`. - /// Sets the waterfall connector of this trace - /// An array containing types of measures. 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. - /// 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. - /// 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. - /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Waterfall - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?TotalsColor: Color, - ?Totals: FinanceMarker, - ?Base: float, - ?Width: float, - ?MultiWidth: seq, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?TextFont: Font, - ?Connector: WaterfallConnector, - ?Measure: StyleParam.WaterfallMeasure seq, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?Orientation: StyleParam.Orientation, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let increasing = - Increasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?FillColor = IncreasingColor) - - let decreasing = - Decreasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?FillColor = DecreasingColor) - - let totals = - Totals - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?FillColor = TotalsColor) - - Trace2D.initWaterfall ( - Trace2DStyle.Waterfall( - X = x, - Y = y, - ?Name = Name, - ?ShowLegend = ShowLegend, - Increasing = increasing, - Decreasing = decreasing, - Totals = totals, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?TextFont = TextFont, - ?Connector = Connector, - ?Measure = Measure, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?Orientation = Orientation - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a waterfall chart from encoded x and y coordinates. - /// - /// Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values - /// - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the color of increasing values - /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of decreasing values - /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of total values - /// Sets the style options of total values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units). - /// Sets the individual bar width for each bar as an encoded typed array. - /// Sets the opacity of the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the font used for `text`. - /// Sets the waterfall connector of this trace - /// An array containing types of measures. 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. - /// 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. - /// 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. - /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Waterfall - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?TotalsColor: Color, - ?Totals: FinanceMarker, - ?Base: float, - ?Width: float, - ?MultiWidthEncoded: EncodedTypedArray, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?TextFont: Font, - ?Connector: WaterfallConnector, - ?Measure: StyleParam.WaterfallMeasure seq, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?Orientation: StyleParam.Orientation, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let increasing = - Increasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?FillColor = IncreasingColor) - - let decreasing = - Decreasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?FillColor = DecreasingColor) - - let totals = - Totals - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?FillColor = TotalsColor) - - Trace2D.initWaterfall ( - Trace2DStyle.Waterfall( - XEncoded = xEncoded, - YEncoded = yEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - Increasing = increasing, - Decreasing = decreasing, - Totals = totals, - ?Base = Base, - ?Width = Width, - ?MultiWidthEncoded = MultiWidthEncoded, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?TextFont = TextFont, - ?Connector = Connector, - ?Measure = Measure, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?Orientation = Orientation - ) - ) - |> GenericChart.ofTraceObject useDefaults - - - /// - /// Creates a waterfall chart. - /// - /// Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values - /// - /// Sets the x and y coordinates of the plotted data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the color of increasing values - /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of decreasing values - /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of total values - /// Sets the style options of total values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units). - /// Sets the individual bar width of each datum (in position axis units). - /// Sets the opacity of the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the font used for `text`. - /// Sets the waterfall connector of this trace - /// An array containing types of measures. 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. - /// 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. - /// 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. - /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Waterfall - ( - xy: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?TotalsColor: Color, - ?Totals: FinanceMarker, - ?Base: float, - ?Width: float, - ?MultiWidth: seq, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?TextFont: Font, - ?Connector: WaterfallConnector, - ?Measure: StyleParam.WaterfallMeasure seq, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?Orientation: StyleParam.Orientation, - ?UseDefaults: bool - ) = - - let x, y = Seq.unzip xy - - Chart.Waterfall( - x = x, - y = y, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?IncreasingColor = IncreasingColor, - ?Increasing = Increasing, - ?DecreasingColor = DecreasingColor, - ?Decreasing = Decreasing, - ?TotalsColor = TotalsColor, - ?Totals = Totals, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?TextFont = TextFont, - ?Connector = Connector, - ?Measure = Measure, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?Orientation = Orientation, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a waterfall chart. - /// - /// Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values - /// - /// Sets the x and y coordinates of the plotted data, together with a measure for each (x,y) pair that defines the type of computation done for each pair. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the color of increasing values - /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of decreasing values - /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of total values - /// Sets the style options of total values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units). - /// Sets the individual bar width of each datum (in position axis units). - /// Sets the opacity of the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the font used for `text`. - /// Sets the waterfall connector of this trace - /// 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. - /// 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. - /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Waterfall - ( - xymeasures: seq<#IConvertible * #IConvertible * StyleParam.WaterfallMeasure>, - ?Name: string, - ?ShowLegend: bool, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?TotalsColor: Color, - ?Totals: FinanceMarker, - ?Base: float, - ?Width: float, - ?MultiWidth: seq, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?TextFont: Font, - ?Connector: WaterfallConnector, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?Orientation: StyleParam.Orientation, - ?UseDefaults: bool - ) = - - let x, y, measure = Seq.unzip3 xymeasures - - Chart.Waterfall( - x = x, - y = y, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?IncreasingColor = IncreasingColor, - ?Increasing = Increasing, - ?DecreasingColor = DecreasingColor, - ?Decreasing = Decreasing, - ?TotalsColor = TotalsColor, - ?Totals = Totals, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?TextFont = TextFont, - ?Connector = Connector, - Measure = measure, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?Orientation = Orientation, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a bar chart, with bars plotted horizontally - /// - /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. - /// - /// Sets the values that are plotted as the size of each bar. - /// Sets the keys associated with each bar. - /// Sets the keys associated with each bar. Use two inner arrays here to plot multicategorial data - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the Opacity of each individual bar. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. - /// Sets the color of the bar outlines - /// Sets a pattern shape for all bars - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Bar - ( - values: seq<#IConvertible>, - ?Keys: seq<#IConvertible>, - ?MultiKeys: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidth: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - Pattern = pattern, - ?MultiOpacity = MultiOpacity, - ?Colorscale = MarkerColorScale, - ?Outline = MarkerOutline - ) - - - Trace2D.initBar ( - Trace2DStyle.Bar( - X = values, - ?Y = Keys, - ?MultiY = MultiKeys, - Orientation = StyleParam.Orientation.Horizontal, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - Marker = marker - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a bar chart with encoded values, plotted horizontally. - /// - /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. - /// - /// Sets the values that are plotted as the size of each bar as an encoded typed array. - /// Sets the keys associated with each bar as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the Opacity of each individual bar. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. - /// Sets the color of the bar outlines - /// Sets a pattern shape for all bars - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width for each bar as an encoded typed array. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Bar - ( - valuesEncoded: EncodedTypedArray, - ?KeysEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidthEncoded: EncodedTypedArray, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - Pattern = pattern, - ?MultiOpacity = MultiOpacity, - ?Colorscale = MarkerColorScale, - ?Outline = MarkerOutline - ) - - - Trace2D.initBar ( - Trace2DStyle.Bar( - XEncoded = valuesEncoded, - ?YEncoded = KeysEncoded, - Orientation = StyleParam.Orientation.Horizontal, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Base = Base, - ?Width = Width, - ?MultiWidthEncoded = MultiWidthEncoded, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - Marker = marker - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a bar chart, with bars plotted horizontally - /// - /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. - /// - /// Sets the (key,value) pairs that are plotted as the size and key of each bar. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the Opacity of each individual bar. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. - /// Sets the color of the bar outlines - /// Sets a pattern shape for all bars - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Bar - ( - keysValues: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidth: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - let keys, values = Seq.unzip keysValues - - Chart.Bar( - values = values, - Keys = keys, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?UseDefaults = UseDefaults - ) - - - /// - /// Creates a stacked bar chart, with bars plotted horizontally. Values with the same key are stacked on top of each other in the X dimension. - /// To create this type of chart, combine multiple of these charts via `Chart.combine`. - /// - /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. - /// - /// Sets the values that are plotted as the size of each bar. - /// Sets the keys associated with each bar. - /// Sets the keys associated with each bar. Use two inner arrays here to plot multicategorial data - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the Opacity of each individual bar. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. - /// Sets the color of the bar outlines - /// Sets a pattern shape for all bars - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member StackedBar - ( - values: seq<#IConvertible>, - ?Keys: seq<#IConvertible>, - ?MultiKeys: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidth: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - Chart.Bar( - values = values, - ?Keys = Keys, - ?MultiKeys = MultiKeys, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?UseDefaults = UseDefaults - ) - |> GenericChart.mapLayout (Layout.style (BarMode = StyleParam.BarMode.Stack)) - - /// - /// Creates a stacked bar chart from encoded values, with bars plotted horizontally. - /// - [] - static member StackedBar - ( - valuesEncoded: EncodedTypedArray, - ?KeysEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidthEncoded: EncodedTypedArray, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - Chart.Bar( - valuesEncoded = valuesEncoded, - ?KeysEncoded = KeysEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?Base = Base, - ?Width = Width, - ?MultiWidthEncoded = MultiWidthEncoded, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?UseDefaults = UseDefaults - ) - |> GenericChart.mapLayout (Layout.style (BarMode = StyleParam.BarMode.Stack)) - - - /// - /// Creates a stacked bar chart, with bars plotted horizontally. Values with the same key are stacked on top of each other in the X dimension. - /// To create this type of chart, combine multiple of these charts via `Chart.combine`. - /// - /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. - /// - /// Sets the (key,value) pairs that are plotted as the size and key of each bar. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the Opacity of each individual bar. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. - /// Sets the color of the bar outlines - /// Sets a pattern shape for all bars - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member StackedBar - ( - keysValues: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidth: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - let keys, values = Seq.unzip keysValues - - Chart.StackedBar( - values = values, - Keys = keys, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a column chart, with bars plotted vertically - /// - /// A column chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. - /// - /// Sets the values that are plotted as the size of each bar. - /// Sets the keys associated with each bar. - /// Sets the keys associated with each bar. Use two inner arrays here to plot multicategorial data - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the Opacity of each individual bar. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. - /// Sets the color of the bar outlines - /// Sets a pattern shape for all bars - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Column - ( - values: seq<#IConvertible>, - ?Keys: seq<#IConvertible>, - ?MultiKeys: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidth: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - Pattern = pattern, - ?MultiOpacity = MultiOpacity, - ?Colorscale = MarkerColorScale, - ?Outline = MarkerOutline - ) - - - Trace2D.initBar ( - Trace2DStyle.Bar( - Y = values, - ?X = Keys, - ?MultiX = MultiKeys, - Orientation = StyleParam.Orientation.Vertical, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - Marker = marker - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a column chart from encoded values, with bars plotted vertically. - /// - [] - static member Column - ( - valuesEncoded: EncodedTypedArray, - ?KeysEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidthEncoded: EncodedTypedArray, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - Pattern = pattern, - ?MultiOpacity = MultiOpacity, - ?Colorscale = MarkerColorScale, - ?Outline = MarkerOutline - ) - - - Trace2D.initBar ( - Trace2DStyle.Bar( - YEncoded = valuesEncoded, - ?XEncoded = KeysEncoded, - Orientation = StyleParam.Orientation.Vertical, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Base = Base, - ?Width = Width, - ?MultiWidthEncoded = MultiWidthEncoded, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - Marker = marker - ) - ) - |> GenericChart.ofTraceObject useDefaults - - - /// - /// Creates a column chart, with bars plotted vertically - /// - /// A column chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. - /// - /// Sets the (key,value) pairs that are plotted as the size and key of each bar. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the Opacity of each individual bar. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. - /// Sets the color of the bar outlines - /// Sets a pattern shape for all bars - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Column - ( - keysValues: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidth: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - let keys, values = Seq.unzip keysValues - - Chart.Column( - values = values, - Keys = keys, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?UseDefaults = UseDefaults - ) - - - /// - /// Creates a stacked column chart, with bars plotted vertically. Values with the same key are stacked on top of each other in the Y dimension. - /// To create this type of chart, combine multiple of these charts via `Chart.combine`. - /// - /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. - /// - /// Sets the values that are plotted as the size of each bar. - /// Sets the keys associated with each bar. - /// Sets the keys associated with each bar. Use two inner arrays here to plot multicategorial data - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the Opacity of each individual bar. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. - /// Sets the color of the bar outlines - /// Sets a pattern shape for all bars - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member StackedColumn - ( - values: seq<#IConvertible>, - ?Keys: seq<#IConvertible>, - ?MultiKeys: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidth: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - Chart.Column( - values = values, - ?Keys = Keys, - ?MultiKeys = MultiKeys, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?UseDefaults = UseDefaults - ) - |> GenericChart.mapLayout (Layout.style (BarMode = StyleParam.BarMode.Stack)) - - /// - /// Creates a stacked column chart from encoded values, with bars plotted vertically. - /// - [] - static member StackedColumn - ( - valuesEncoded: EncodedTypedArray, - ?KeysEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidthEncoded: EncodedTypedArray, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - Chart.Column( - valuesEncoded = valuesEncoded, - ?KeysEncoded = KeysEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?Base = Base, - ?Width = Width, - ?MultiWidthEncoded = MultiWidthEncoded, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?UseDefaults = UseDefaults - ) - |> GenericChart.mapLayout (Layout.style (BarMode = StyleParam.BarMode.Stack)) - - - /// - /// Creates a stacked column chart, with bars plotted vertically. Values with the same key are stacked on top of each other in the Y dimension. - /// To create this type of chart, combine multiple of these charts via `Chart.combine`. - /// - /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. - /// - /// Sets the (key,value) pairs that are plotted as the size and key of each bar. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the Opacity of each individual bar. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. - /// Sets the color of the bar outlines - /// Sets a pattern shape for all bars - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member StackedColumn - ( - keysValues: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidth: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?UseDefaults: bool - ) = - - let keys, values = Seq.unzip keysValues - - Chart.StackedColumn( - values = values, - Keys = keys, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?UseDefaults = UseDefaults - ) - - - /// - /// Visualizes the distribution of the input data as a histogram. - /// - /// A histogram is an approximate representation of the distribution of numerical data. To construct a histogram, the first step is to "bin" the range of values - that is, divide the entire range of values into a series of intervals - and then count how many values fall into each interval. - /// The bins are usually specified as consecutive, non-overlapping intervals of a variable. - /// - /// The sample data from which statistics are computed is set in `x` for vertically spanning histograms and in `y` for horizontally spanning histograms. Binning options are set `xbins` and `ybins` respectively if no aggregation data is provided. - /// - /// Sets the sample data to be binned on the x axis. - /// Sets the sample data to be binned on the x axis. Use two inner arrays here to plot multicategorial data - /// Sets the sample data to be binned on the y axis. - /// Sets the sample data to be binned on the y axis. Use two inner arrays here to plot multicategorial data - /// Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal). - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. - /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). - /// 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. - /// 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. - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - /// Set a group of histogram traces which will have compatible bin settings. Note that traces on the same subplot and with the same "orientation" under `barmode` "stack", "relative" and "group" are forced into the same bingroup, Using `bingroup`, traces under `barmode` "overlay" and on different axes (of the same axis type) can have compatible bin settings. Note that histogram and histogram2d" trace can share the same `bingroup` - /// Sets the binning across the x dimension - /// Sets the binning across the y dimension - /// Sets the color of the bars - /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. - /// Sets the color of the bar outlines - /// Sets a pattern shape for all bars - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker of this trace. - /// Sets the outline of the histogram's bars. - /// Sets the x error of this trace. - /// Sets the y error of this trace. - /// Sets whether and how the cumulative distribution is displayed - /// Sets the style of the hoverlabels of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Histogram - ( - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?Y: seq<#IConvertible>, - ?MultiY: seq>, - ?Orientation: StyleParam.Orientation, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?HistFunc: StyleParam.HistFunc, - ?HistNorm: StyleParam.HistNorm, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?NBinsX: int, - ?NBinsY: int, - ?BinGroup: string, - ?XBins: Bins, - ?YBins: Bins, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Line: Line, - ?XError: Error, - ?YError: Error, - ?Cumulative: Cumulative, - ?HoverLabel: Hoverlabel, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - Pattern = pattern, - ?Colorscale = MarkerColorScale, - ?Outline = MarkerOutline - ) - - Trace2D.initHistogram ( - Trace2DStyle.Histogram( - ?X = X, - ?MultiX = MultiX, - ?Y = Y, - ?MultiY = MultiY, - ?Orientation = Orientation, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?HistFunc = HistFunc, - ?HistNorm = HistNorm, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?NBinsX = NBinsX, - ?NBinsY = NBinsY, - ?BinGroup = BinGroup, - ?XBins = XBins, - ?YBins = YBins, - Marker = marker, - ?Line = Line, - ?XError = XError, - ?YError = YError, - ?Cumulative = Cumulative, - ?HoverLabel = HoverLabel - ) - ) - |> GenericChart.ofTraceObject useDefaults - - - /// - /// Visualizes the distribution of the input data as a histogram, automatically determining if the data is to be used for the x or y dimension based on the `orientation` parameter. - /// - /// A histogram is an approximate representation of the distribution of numerical data. To construct a histogram, the first step is to "bin" the range of values - that is, divide the entire range of values into a series of intervals - and then count how many values fall into each interval. - /// The bins are usually specified as consecutive, non-overlapping intervals of a variable. - /// - /// Binning options are set `xbins` and `ybins` respectively if no aggregation data is provided. - /// - /// Sets the sample data to be binned - /// Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal). - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. - /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). - /// 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. - /// 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. - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - /// Set a group of histogram traces which will have compatible bin settings. Note that traces on the same subplot and with the same "orientation" under `barmode` "stack", "relative" and "group" are forced into the same bingroup, Using `bingroup`, traces under `barmode` "overlay" and on different axes (of the same axis type) can have compatible bin settings. Note that histogram and histogram2d" trace can share the same `bingroup` - /// Sets the binning across the x dimension - /// Sets the binning across the y dimension - /// Sets the color of the histogram's bars. - /// Sets the marker for the histogram's bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets the outline of the histogram's bars. - /// Sets the x error of this trace. - /// Sets the y error of this trace. - /// Sets whether and how the cumulative distribution is displayed - /// Sets the style of the hoverlabels of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Histogram - ( - data: seq<#IConvertible>, - orientation: StyleParam.Orientation, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?HistFunc: StyleParam.HistFunc, - ?HistNorm: StyleParam.HistNorm, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?NBinsX: int, - ?NBinsY: int, - ?BinGroup: string, - ?XBins: Bins, - ?YBins: Bins, - ?MarkerColor: Color, - ?Marker: Marker, - ?Line: Line, - ?XError: Error, - ?YError: Error, - ?Cumulative: Cumulative, - ?HoverLabel: Hoverlabel, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let histChart = - Trace2D.initHistogram ( - Trace2DStyle.Histogram( - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - Orientation = orientation, - ?HistFunc = HistFunc, - ?HistNorm = HistNorm, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?NBinsX = NBinsX, - ?NBinsY = NBinsY, - ?BinGroup = BinGroup, - ?XBins = XBins, - ?YBins = YBins, - ?Marker = Marker, - ?Line = Line, - ?XError = XError, - ?YError = YError, - ?Cumulative = Cumulative, - ?HoverLabel = HoverLabel - ) - ) - |> TraceStyle.Marker(?Color = MarkerColor) - |> TraceStyle.TraceInfo(?Name = Name, ?ShowLegend = ShowLegend) - |> GenericChart.ofTraceObject useDefaults - - match orientation with - | StyleParam.Orientation.Horizontal -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(Y = data)) - | StyleParam.Orientation.Vertical -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(X = data)) - - /// - /// Visualizes the distribution of the input data as a histogram using an encoded typed array. - /// - /// Sets the sample data to be binned as an encoded typed array. - /// Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal). - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Specifies the binning function used for this histogram trace. - /// Specifies the type of normalization used for this histogram trace. - /// Set several traces linked to the same position axis or matching axes to the same alignmentgroup. - /// 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. - /// Specifies the maximum number of desired bins. - /// Specifies the maximum number of desired bins. - /// Set a group of histogram traces which will have compatible bin settings. - /// Sets the binning across the x dimension - /// Sets the binning across the y dimension - /// Sets the color of the histogram's bars. - /// Sets the marker for the histogram's bars. - /// Sets the outline of the histogram's bars. - /// Sets the x error of this trace. - /// Sets the y error of this trace. - /// Sets whether and how the cumulative distribution is displayed - /// Sets the style of the hoverlabels of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Histogram - ( - dataEncoded: EncodedTypedArray, - orientation: StyleParam.Orientation, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?HistFunc: StyleParam.HistFunc, - ?HistNorm: StyleParam.HistNorm, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?NBinsX: int, - ?NBinsY: int, - ?BinGroup: string, - ?XBins: Bins, - ?YBins: Bins, - ?MarkerColor: Color, - ?Marker: Marker, - ?Line: Line, - ?XError: Error, - ?YError: Error, - ?Cumulative: Cumulative, - ?HoverLabel: Hoverlabel, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let histChart = - Trace2D.initHistogram ( - Trace2DStyle.Histogram( - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - Orientation = orientation, - ?HistFunc = HistFunc, - ?HistNorm = HistNorm, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?NBinsX = NBinsX, - ?NBinsY = NBinsY, - ?BinGroup = BinGroup, - ?XBins = XBins, - ?YBins = YBins, - ?Marker = Marker, - ?Line = Line, - ?XError = XError, - ?YError = YError, - ?Cumulative = Cumulative, - ?HoverLabel = HoverLabel - ) - ) - |> TraceStyle.Marker(?Color = MarkerColor) - |> TraceStyle.TraceInfo(?Name = Name, ?ShowLegend = ShowLegend) - |> GenericChart.ofTraceObject useDefaults - - match orientation with - | StyleParam.Orientation.Horizontal -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(YEncoded = dataEncoded)) - | StyleParam.Orientation.Vertical -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(XEncoded = dataEncoded)) - - /// - /// Visualizes the distribution of the 2-dimensional input data as 2D Histogram. - /// - ///The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a heatmap. - /// - /// Sets the sample data to be binned on the x axis. - /// Sets the sample data to be binned on the x axis. Use two inner arrays here to plot multicategorial data - /// Sets the sample data to be binned on the y axis. - /// Sets the sample data to be binned on the y axis. Use two inner arrays here to plot multicategorial data - /// Sets the aggregation data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the horizontal gap (in pixels) between bricks. - /// Sets the vertical gap (in pixels) between bricks. - /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. - /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - /// Sets the binning across the x dimension - /// Sets the binning across the y dimension - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Picks a smoothing algorithm use to smooth `z` data. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Histogram2D - ( - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?Y: seq<#IConvertible>, - ?MultiY: seq>, - ?Z: seq<#seq<#IConvertible>>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?XGap: int, - ?YGap: int, - ?HistFunc: StyleParam.HistFunc, - ?HistNorm: StyleParam.HistNorm, - ?NBinsX: int, - ?NBinsY: int, - ?XBins: Bins, - ?YBins: Bins, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?ZSmooth: StyleParam.SmoothAlg, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - Trace2D.initHistogram2D ( - Trace2DStyle.Histogram2D( - ?X = X, - ?MultiX = MultiX, - ?Y = Y, - ?MultiY = MultiY, - ?Z = Z, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?XGap = XGap, - ?YGap = YGap, - ?HistFunc = HistFunc, - ?HistNorm = HistNorm, - ?NBinsX = NBinsX, - ?NBinsY = NBinsY, - ?XBins = XBins, - ?YBins = YBins, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?ZSmooth = ZSmooth - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Visualizes the distribution of the encoded 2-dimensional input data as a 2D histogram. - /// - /// The sample data from which statistics are computed is set in `xEncoded` and `yEncoded`, and optional encoded aggregation data can be provided through `zEncoded`. - /// - /// Sets the sample data to be binned on the x axis as an encoded typed array. - /// Sets the sample data to be binned on the y axis as an encoded typed array. - /// Sets the aggregation data as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the horizontal gap (in pixels) between bricks. - /// Sets the vertical gap (in pixels) between bricks. - /// Specifies the binning function used for this histogram trace. - /// Specifies the type of normalization used for this histogram trace. - /// Specifies the maximum number of desired bins. - /// Specifies the maximum number of desired bins. - /// Sets the binning across the x dimension - /// Sets the binning across the y dimension - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. - /// Picks a smoothing algorithm use to smooth `z` data. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Histogram2D - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?zEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?XGap: int, - ?YGap: int, - ?HistFunc: StyleParam.HistFunc, - ?HistNorm: StyleParam.HistNorm, - ?NBinsX: int, - ?NBinsY: int, - ?XBins: Bins, - ?YBins: Bins, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?ZSmooth: StyleParam.SmoothAlg, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - Trace2D.initHistogram2D ( - Trace2DStyle.Histogram2D( - XEncoded = xEncoded, - YEncoded = yEncoded, - ?ZEncoded = zEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?XGap = XGap, - ?YGap = YGap, - ?HistFunc = HistFunc, - ?HistNorm = HistNorm, - ?NBinsX = NBinsX, - ?NBinsY = NBinsY, - ?XBins = XBins, - ?YBins = YBins, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?ZSmooth = ZSmooth - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Visualizes the distribution of the 2-dimensional input data as 2D Histogram. - /// - ///The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a heatmap. - /// - /// Sets the sample data to be binned on the x axis. - /// Sets the sample data to be binned on the y axis. - /// Sets the aggregation data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets the horizontal gap (in pixels) between bricks. - /// Sets the vertical gap (in pixels) between bricks. - /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. - /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - /// Sets the binning across the x dimension - /// Sets the binning across the y dimension - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Picks a smoothing algorithm use to smooth `z` data. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Histogram2D - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?Z: seq<#seq<#IConvertible>>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?XGap: int, - ?YGap: int, - ?HistFunc: StyleParam.HistFunc, - ?HistNorm: StyleParam.HistNorm, - ?NBinsX: int, - ?NBinsY: int, - ?XBins: Bins, - ?YBins: Bins, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?ZSmooth: StyleParam.SmoothAlg, - ?UseDefaults: bool - ) = - - Chart.Histogram2D( - X = x, - Y = y, - ?Z = Z, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?XGap = XGap, - ?YGap = YGap, - ?HistFunc = HistFunc, - ?HistNorm = HistNorm, - ?NBinsX = NBinsX, - ?NBinsY = NBinsY, - ?XBins = XBins, - ?YBins = YBins, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?ZSmooth = ZSmooth, - ?UseDefaults = UseDefaults - ) - - - /// - /// Visualizes the distribution of the input data as a box plot. - /// - /// A box plot is a method for graphically demonstrating the locality, spread and skewness groups of numerical data through their quartiles. - /// The default style is based on the five number summary: minimum, first quartile, median, third quartile, and maximum. - /// - /// The sample data from which statistics are computed is set in `x` for vertically spanning boxes and in `y` for horizontally spanning boxes. - /// - /// Sets the x sample data or coordinates - /// Sets the x sample data or coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the y sample data or coordinates - /// Sets the y sample data or coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the marker color. - /// Sets the marker for the box (use this for more finegrained control than the other marker-associated arguments).// Sets the opacity of this trace. - /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). - /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the box(es) are shown with no sample points Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set. Defaults to "all" under the q1/median/q3 signature. Otherwise defaults to "outliers". - /// If "true", the mean of the box(es)' underlying distribution is drawn as a dashed line inside the box(es). If "sd" the standard deviation is also drawn. Defaults to "true" when `mean` is set. Defaults to "sd" when `sd` is set Otherwise defaults to "false". - /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). - /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes - /// Sets the orientation of the box(es). If "v" ("h"), the distribution is visualized along the vertical (horizontal). - /// Sets the color of the box outline - /// Sets the width of the box outline - /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). - /// 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. - /// 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. - /// Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 " IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes' notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info. Defaults to "false" unless `notchwidth` or `notchspan` is set. - /// Sets the width of the notches relative to the box' width. For example, with 0, the notches are as wide as the box(es). - /// Sets the method used to compute the sample's Q1 and Q3 quartiles. The "linear" method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://www.amstat.org/publications/jse/v14n3/langford.html). The "exclusive" method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The "inclusive" method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half. - /// Sets the upper and lower bound for the boxes quartiles means box is drawn between Q1 and Q3 SD means the box is drawn between Mean +- Standard Deviation Argument sdmultiple (default 1) to scale the box size So it could be drawn 1-stddev, 3-stddev etc - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member BoxPlot - ( - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?Y: seq<#IConvertible>, - ?MultiY: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?FillColor: Color, - ?MarkerColor: Color, - ?Marker: Marker, - ?Opacity: float, - ?WhiskerWidth: float, - ?BoxPoints: StyleParam.BoxPoints, - ?BoxMean: StyleParam.BoxMean, - ?Jitter: float, - ?PointPos: float, - ?Orientation: StyleParam.Orientation, - ?OutlineColor: Color, - ?OutlineWidth: float, - ?Outline: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?Notched: bool, - ?NotchWidth: float, - ?QuartileMethod: StyleParam.QuartileMethod, - ?SizeMode: StyleParam.BoxSizeMode, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let outline = - Outline - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style (?Color = OutlineColor, ?Width = OutlineWidth) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style (?Color = MarkerColor) - - - Trace2D.initBoxPlot ( - Trace2DStyle.BoxPlot( - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?X = X, - ?MultiX = MultiX, - ?Y = Y, - ?MultiY = MultiY, - ?Text = Text, - ?MultiText = MultiText, - ?WhiskerWidth = WhiskerWidth, - ?BoxPoints = BoxPoints, - ?BoxMean = BoxMean, - ?Jitter = Jitter, - ?PointPos = PointPos, - ?Orientation = Orientation, - ?FillColor = FillColor, - Marker = marker, - Line = outline, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?Notched = Notched, - ?NotchWidth = NotchWidth, - ?QuartileMethod = QuartileMethod, - ?SizeMode = SizeMode - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Visualizes the distribution of the input data as a box plot. - /// - /// A box plot is a method for graphically demonstrating the locality, spread and skewness groups of numerical data through their quartiles. - /// The default style is based on the five number summary: minimum, first quartile, median, third quartile, and maximum. - /// - /// The sample data from which statistics are computed is set in `x` for vertically spanning boxes and in `y` for horizontally spanning boxes. - /// - /// Sets the sample data or coordinates - /// Sets the orientation of the box. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the marker color. - /// Sets the marker for the box (use this for more finegrained control than the other marker-associated arguments).// Sets the opacity of this trace. - /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). - /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the box(es) are shown with no sample points Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set. Defaults to "all" under the q1/median/q3 signature. Otherwise defaults to "outliers". - /// If "true", the mean of the box(es)' underlying distribution is drawn as a dashed line inside the box(es). If "sd" the standard deviation is also drawn. Defaults to "true" when `mean` is set. Defaults to "sd" when `sd` is set Otherwise defaults to "false". - /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). - /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes - /// Sets the color of the box outline - /// Sets the width of the box outline - /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). - /// 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. - /// 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. - /// Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 " IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes' notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info. Defaults to "false" unless `notchwidth` or `notchspan` is set. - /// Sets the width of the notches relative to the box' width. For example, with 0, the notches are as wide as the box(es). - /// Sets the method used to compute the sample's Q1 and Q3 quartiles. The "linear" method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://www.amstat.org/publications/jse/v14n3/langford.html). The "exclusive" method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The "inclusive" method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half. - /// Sets the upper and lower bound for the boxes quartiles means box is drawn between Q1 and Q3 SD means the box is drawn between Mean +- Standard Deviation Argument sdmultiple (default 1) to scale the box size So it could be drawn 1-stddev, 3-stddev etc - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member BoxPlot - ( - data: seq<#IConvertible>, - orientation: StyleParam.Orientation, - ?Name: string, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?FillColor: Color, - ?MarkerColor: Color, - ?Marker: Marker, - ?Opacity: float, - ?WhiskerWidth: float, - ?BoxPoints: StyleParam.BoxPoints, - ?BoxMean: StyleParam.BoxMean, - ?Jitter: float, - ?PointPos: float, - ?OutlineColor: Color, - ?OutlineWidth: float, - ?Outline: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?Notched: bool, - ?NotchWidth: float, - ?QuartileMethod: StyleParam.QuartileMethod, - ?SizeMode: StyleParam.BoxSizeMode, - ?UseDefaults: bool - ) = - - let boxplot = - Chart.BoxPlot( - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?FillColor = FillColor, - ?MarkerColor = MarkerColor, - ?Marker = Marker, - ?Opacity = Opacity, - ?WhiskerWidth = WhiskerWidth, - ?BoxPoints = BoxPoints, - ?BoxMean = BoxMean, - ?Jitter = Jitter, - ?PointPos = PointPos, - ?OutlineColor = OutlineColor, - ?OutlineWidth = OutlineWidth, - ?Outline = Outline, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?Notched = Notched, - ?NotchWidth = NotchWidth, - ?QuartileMethod = QuartileMethod, - ?SizeMode = SizeMode, - ?UseDefaults = UseDefaults - ) - - match orientation with - | StyleParam.Orientation.Horizontal -> boxplot |> GenericChart.mapTrace (Trace2DStyle.BoxPlot(X = data)) - | StyleParam.Orientation.Vertical -> boxplot |> GenericChart.mapTrace (Trace2DStyle.BoxPlot(Y = data)) - - /// - /// Visualizes the distribution of the input data as a box plot using an encoded typed array. - /// - /// Sets the sample data or coordinates as an encoded typed array. - /// Sets the orientation of the box. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the fill color. - /// Sets the marker color. - /// Sets the marker for the box. - /// Sets the opacity of this trace. - /// Sets the width of the whiskers relative to the box' width. - /// Controls which sample points are shown. - /// Controls whether and how the mean is displayed. - /// Sets the amount of jitter in the sample points drawn. - /// Sets the position of the sample points in relation to the box(es). - /// Sets the color of the box outline - /// Sets the width of the box outline - /// Sets the box outline. - /// Set several traces linked to the same position axis or matching axes to the same alignmentgroup. - /// 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. - /// Determines whether or not notches are drawn. - /// Sets the width of the notches relative to the box' width. - /// Sets the method used to compute the sample's Q1 and Q3 quartiles. - /// Sets how box sizes are derived. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member BoxPlot - ( - dataEncoded: EncodedTypedArray, - orientation: StyleParam.Orientation, - ?Name: string, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?FillColor: Color, - ?MarkerColor: Color, - ?Marker: Marker, - ?Opacity: float, - ?WhiskerWidth: float, - ?BoxPoints: StyleParam.BoxPoints, - ?BoxMean: StyleParam.BoxMean, - ?Jitter: float, - ?PointPos: float, - ?OutlineColor: Color, - ?OutlineWidth: float, - ?Outline: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?Notched: bool, - ?NotchWidth: float, - ?QuartileMethod: StyleParam.QuartileMethod, - ?SizeMode: StyleParam.BoxSizeMode, - ?UseDefaults: bool - ) = - - let boxplot = - Chart.BoxPlot( - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?FillColor = FillColor, - ?MarkerColor = MarkerColor, - ?Marker = Marker, - ?Opacity = Opacity, - ?WhiskerWidth = WhiskerWidth, - ?BoxPoints = BoxPoints, - ?BoxMean = BoxMean, - ?Jitter = Jitter, - ?PointPos = PointPos, - ?OutlineColor = OutlineColor, - ?OutlineWidth = OutlineWidth, - ?Outline = Outline, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?Notched = Notched, - ?NotchWidth = NotchWidth, - ?QuartileMethod = QuartileMethod, - ?SizeMode = SizeMode, - ?UseDefaults = UseDefaults - ) - - match orientation with - | StyleParam.Orientation.Horizontal -> boxplot |> GenericChart.mapTrace (Trace2DStyle.BoxPlot(XEncoded = dataEncoded)) - | StyleParam.Orientation.Vertical -> boxplot |> GenericChart.mapTrace (Trace2DStyle.BoxPlot(YEncoded = dataEncoded)) - - - /// - /// Visualizes the distribution of the input data as a box plot. - /// - /// A box plot is a method for graphically demonstrating the locality, spread and skewness groups of numerical data through their quartiles. - /// The default style is based on the five number summary: minimum, first quartile, median, third quartile, and maximum. - /// - /// The sample data from which statistics are computed is set in `x` for vertically spanning boxes and in `y` for horizontally spanning boxes. - /// - /// Sets the xy sample data or coordinate pairs - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the marker color. - /// Sets the marker for the box (use this for more finegrained control than the other marker-associated arguments).// Sets the opacity of this trace. - /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). - /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the box(es) are shown with no sample points Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set. Defaults to "all" under the q1/median/q3 signature. Otherwise defaults to "outliers". - /// If "true", the mean of the box(es)' underlying distribution is drawn as a dashed line inside the box(es). If "sd" the standard deviation is also drawn. Defaults to "true" when `mean` is set. Defaults to "sd" when `sd` is set Otherwise defaults to "false". - /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). - /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes - /// Sets the orientation of the box(es). If "v" ("h"), the distribution is visualized along the vertical (horizontal). - /// Sets the color of the box outline - /// Sets the width of the box outline - /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). - /// 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. - /// 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. - /// Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 " IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes' notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info. Defaults to "false" unless `notchwidth` or `notchspan` is set. - /// Sets the width of the notches relative to the box' width. For example, with 0, the notches are as wide as the box(es). - /// Sets the method used to compute the sample's Q1 and Q3 quartiles. The "linear" method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://www.amstat.org/publications/jse/v14n3/langford.html). The "exclusive" method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The "inclusive" method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half. - /// Sets the upper and lower bound for the boxes quartiles means box is drawn between Q1 and Q3 SD means the box is drawn between Mean +- Standard Deviation Argument sdmultiple (default 1) to scale the box size So it could be drawn 1-stddev, 3-stddev etc - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member BoxPlot - ( - xy: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?FillColor: Color, - ?MarkerColor: Color, - ?Marker: Marker, - ?Opacity: float, - ?WhiskerWidth: float, - ?BoxPoints: StyleParam.BoxPoints, - ?BoxMean: StyleParam.BoxMean, - ?Jitter: float, - ?PointPos: float, - ?Orientation: StyleParam.Orientation, - ?OutlineColor: Color, - ?OutlineWidth: float, - ?Outline: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?Notched: bool, - ?NotchWidth: float, - ?QuartileMethod: StyleParam.QuartileMethod, - ?SizeMode: StyleParam.BoxSizeMode, - ?UseDefaults: bool - ) = - - let x, y = Seq.unzip xy - - Chart.BoxPlot( - X = x, - Y = y, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?FillColor = FillColor, - ?MarkerColor = MarkerColor, - ?Marker = Marker, - ?Opacity = Opacity, - ?WhiskerWidth = WhiskerWidth, - ?BoxPoints = BoxPoints, - ?BoxMean = BoxMean, - ?Jitter = Jitter, - ?PointPos = PointPos, - ?Orientation = Orientation, - ?OutlineColor = OutlineColor, - ?OutlineWidth = OutlineWidth, - ?Outline = Outline, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?Notched = Notched, - ?NotchWidth = NotchWidth, - ?QuartileMethod = QuartileMethod, - ?SizeMode = SizeMode, - ?UseDefaults = UseDefaults - ) - - - /// - /// Visualizes the distribution of the input data as a violin plot. - /// - /// A violin plot is a method of plotting numeric data. It is similar to a box plot, except that they also show the probability density of the data at different values, usually smoothed by a kernel density estimator. - /// - /// In vertical (horizontal) violin plots, statistics are computed using `y` (`x`) values. By supplying an `x` (`y`) array, one violin per distinct x (y) value is drawn If no `x` (`y`) array is provided, a single violin is drawn. That violin position is then positioned with with `name` or with `x0` (`y0`) if provided. - /// - /// Sets the x sample data or coordinates - /// Sets the x sample data or coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the y sample data or coordinates - /// Sets the y sample data or coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the Opacity otf the trace. - /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the violins are shown with no sample points. Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set, otherwise defaults to "outliers". - /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). - /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes - /// Sets the orientation of the violin(s). If "v" ("h"), the distribution is visualized along the vertical (horizontal). - /// Sets the width of the violin in data coordinates. If "0" (default value) the width is automatically selected based on the positions of other violin traces in the same subplot. - /// Sets the marker color. - /// Sets the marker for the violin (use this for more finegrained control than the other marker-associated arguments). - /// Sets the color of the box outline - /// Sets the width of the box outline - /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). - /// 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. - /// 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. - /// Whether and how to draw a miniature box plot - /// Sets the width of the miniature box plot - /// Sets the fill color of the miniature box plot - /// Sets the styles of the miniature box plot (use this for more finegrained control than the other box-associated arguments) - /// Sets the bandwidth used to compute the kernel density estimate. By default, the bandwidth is determined by Silverman's rule of thumb. - /// Whether and how to draw the meanline - /// If there are multiple violins that should be sized according to to some metric (see `scalemode`), link them by providing a non-empty group id here shared by every trace in the same group. If a violin's `width` is undefined, `scalegroup` will default to the trace's name. In this case, violins with the same names will be linked together - /// Sets the metric by which the width of each violin is determined."width" means each violin has the same (max) width"count" means the violins are scaled by the number of sample points makingup each violin. - /// Determines on which side of the position value the density function making up one half of a violin is plotted. Useful when comparing two violin traces under "overlay" mode, where one trace has `side` set to "positive" and the other to "negative". - /// Sets the span in data space for which the density function will be computed. Has an effect only when `spanmode` is set to "manual". - /// Sets the method by which the span in data space where the density function will be computed. "soft" means the span goes from the sample's minimum value minus two bandwidths to the sample's maximum value plus two bandwidths. "hard" means the span goes from the sample's minimum to its maximum value. For custom span settings, use mode "manual" and fill in the `span` attribute. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Violin - ( - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?Y: seq<#IConvertible>, - ?MultiY: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?FillColor: Color, - ?Opacity: float, - ?Points: StyleParam.JitterPoints, - ?Jitter: float, - ?PointPos: float, - ?Orientation: StyleParam.Orientation, - ?Width: float, - ?MarkerColor: Color, - ?Marker: Marker, - ?OutlineColor: Color, - ?OutlineWidth: float, - ?Outline: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?ShowBox: bool, - ?BoxWidth: float, - ?BoxFillColor: Color, - ?Box: Box, - ?BandWidth: float, - ?MeanLine: MeanLine, - ?ScaleGroup: string, - ?ScaleMode: StyleParam.ScaleMode, - ?Side: StyleParam.ViolinSide, - ?Span: StyleParam.Range, - ?SpanMode: StyleParam.SpanMode, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let box = - Box - |> Option.defaultValue (TraceObjects.Box.init ()) - |> TraceObjects.Box.style (?Visible = ShowBox, ?Width = BoxWidth, ?FillColor = BoxFillColor) - - let outline = - Outline - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style (?Color = OutlineColor, ?Width = OutlineWidth) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style (?Color = MarkerColor) - - Trace2D.initViolin ( - Trace2DStyle.Violin( - ?X = X, - ?MultiX = MultiX, - ?Y = Y, - ?MultiY = MultiY, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?FillColor = FillColor, - ?Points = Points, - ?Jitter = Jitter, - ?PointPos = PointPos, - ?Orientation = Orientation, - ?Width = Width, - Marker = marker, - Line = outline, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - Box = box, - ?BandWidth = BandWidth, - ?MeanLine = MeanLine, - ?ScaleGroup = ScaleGroup, - ?ScaleMode = ScaleMode, - ?Side = Side, - ?Span = Span, - ?SpanMode = SpanMode - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Visualizes the distribution of the input data as a violin plot. - /// - /// A violin plot is a method of plotting numeric data. It is similar to a box plot, except that they also show the probability density of the data at different values, usually smoothed by a kernel density estimator. - /// - /// In vertical (horizontal) violin plots, statistics are computed using `y` (`x`) values. By supplying an `x` (`y`) array, one violin per distinct x (y) value is drawn If no `x` (`y`) array is provided, a single violin is drawn. That violin position is then positioned with with `name` or with `x0` (`y0`) if provided. - /// - /// Sets the sample data or coordinate pairs - /// Sets the orientation of the violin(s). If "v" ("h"), the distribution is visualized along the vertical (horizontal). - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the Opacity otf the trace. - /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the violins are shown with no sample points. Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set, otherwise defaults to "outliers". - /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). - /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes - /// Sets the width of the violin in data coordinates. If "0" (default value) the width is automatically selected based on the positions of other violin traces in the same subplot. - /// Sets the marker color. - /// Sets the marker for the violin (use this for more finegrained control than the other marker-associated arguments). - /// Sets the color of the box outline - /// Sets the width of the box outline - /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). - /// 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. - /// 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. - /// Whether and how to draw a miniature box plot - /// Sets the width of the miniature box plot - /// Sets the fill color of the miniature box plot - /// Sets the styles of the miniature box plot (use this for more finegrained control than the other box-associated arguments) - /// Sets the bandwidth used to compute the kernel density estimate. By default, the bandwidth is determined by Silverman's rule of thumb. - /// Whether and how to draw the meanline - /// If there are multiple violins that should be sized according to to some metric (see `scalemode`), link them by providing a non-empty group id here shared by every trace in the same group. If a violin's `width` is undefined, `scalegroup` will default to the trace's name. In this case, violins with the same names will be linked together - /// Sets the metric by which the width of each violin is determined."width" means each violin has the same (max) width"count" means the violins are scaled by the number of sample points makingup each violin. - /// Determines on which side of the position value the density function making up one half of a violin is plotted. Useful when comparing two violin traces under "overlay" mode, where one trace has `side` set to "positive" and the other to "negative". - /// Sets the span in data space for which the density function will be computed. Has an effect only when `spanmode` is set to "manual". - /// Sets the method by which the span in data space where the density function will be computed. "soft" means the span goes from the sample's minimum value minus two bandwidths to the sample's maximum value plus two bandwidths. "hard" means the span goes from the sample's minimum to its maximum value. For custom span settings, use mode "manual" and fill in the `span` attribute. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Violin - ( - data: seq<#IConvertible>, - orientation: StyleParam.Orientation, - ?Name: string, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?FillColor: Color, - ?Opacity: float, - ?Points: StyleParam.JitterPoints, - ?Jitter: float, - ?PointPos: float, - ?Width: float, - ?MarkerColor: Color, - ?Marker: Marker, - ?OutlineColor: Color, - ?OutlineWidth: float, - ?Outline: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?ShowBox: bool, - ?BoxWidth: float, - ?BoxFillColor: Color, - ?Box: Box, - ?BandWidth: float, - ?MeanLine: MeanLine, - ?ScaleGroup: string, - ?ScaleMode: StyleParam.ScaleMode, - ?Side: StyleParam.ViolinSide, - ?Span: StyleParam.Range, - ?SpanMode: StyleParam.SpanMode, - ?UseDefaults: bool - ) = - - let violin = - Chart.Violin( - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?FillColor = FillColor, - ?Opacity = Opacity, - ?Points = Points, - ?Jitter = Jitter, - ?PointPos = PointPos, - ?Width = Width, - ?MarkerColor = MarkerColor, - ?Marker = Marker, - ?OutlineColor = OutlineColor, - ?OutlineWidth = OutlineWidth, - ?Outline = Outline, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?ShowBox = ShowBox, - ?BoxWidth = BoxWidth, - ?BoxFillColor = BoxFillColor, - ?Box = Box, - ?BandWidth = BandWidth, - ?MeanLine = MeanLine, - ?ScaleGroup = ScaleGroup, - ?ScaleMode = ScaleMode, - ?Side = Side, - ?Span = Span, - ?SpanMode = SpanMode, - ?UseDefaults = UseDefaults - ) - - match orientation with - | StyleParam.Orientation.Horizontal -> violin |> GenericChart.mapTrace (Trace2DStyle.Violin(X = data)) - | StyleParam.Orientation.Vertical -> violin |> GenericChart.mapTrace (Trace2DStyle.Violin(Y = data)) - - /// - /// Visualizes the distribution of the input data as a violin plot using an encoded typed array. - /// - /// Sets the sample data or coordinates as an encoded typed array. - /// Sets the orientation of the violin(s). - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the fill color. - /// Sets the Opacity of the trace. - /// Controls which sample points are shown. - /// Sets the amount of jitter in the sample points drawn. - /// Sets the position of the sample points in relation to the box(es). - /// Sets the width of the violin in data coordinates. - /// Sets the marker color. - /// Sets the marker for the violin. - /// Sets the color of the box outline - /// Sets the width of the box outline - /// Sets the box outline. - /// Set several traces linked to the same position axis or matching axes to the same alignmentgroup. - /// 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. - /// Whether and how to draw a miniature box plot - /// Sets the width of the miniature box plot - /// Sets the fill color of the miniature box plot - /// Sets the styles of the miniature box plot. - /// Sets the bandwidth used to compute the kernel density estimate. - /// Whether and how to draw the meanline - /// Links violins that should be sized according to the same metric. - /// Sets the metric by which the width of each violin is determined. - /// Determines on which side of the position value one half of a violin is plotted. - /// Sets the span in data space for which the density function will be computed. - /// Sets the method by which the span in data space is computed. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Violin - ( - dataEncoded: EncodedTypedArray, - orientation: StyleParam.Orientation, - ?Name: string, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?FillColor: Color, - ?Opacity: float, - ?Points: StyleParam.JitterPoints, - ?Jitter: float, - ?PointPos: float, - ?Width: float, - ?MarkerColor: Color, - ?Marker: Marker, - ?OutlineColor: Color, - ?OutlineWidth: float, - ?Outline: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?ShowBox: bool, - ?BoxWidth: float, - ?BoxFillColor: Color, - ?Box: Box, - ?BandWidth: float, - ?MeanLine: MeanLine, - ?ScaleGroup: string, - ?ScaleMode: StyleParam.ScaleMode, - ?Side: StyleParam.ViolinSide, - ?Span: StyleParam.Range, - ?SpanMode: StyleParam.SpanMode, - ?UseDefaults: bool - ) = - - let violin = - Chart.Violin( - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?FillColor = FillColor, - ?Opacity = Opacity, - ?Points = Points, - ?Jitter = Jitter, - ?PointPos = PointPos, - ?Width = Width, - ?MarkerColor = MarkerColor, - ?Marker = Marker, - ?OutlineColor = OutlineColor, - ?OutlineWidth = OutlineWidth, - ?Outline = Outline, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?ShowBox = ShowBox, - ?BoxWidth = BoxWidth, - ?BoxFillColor = BoxFillColor, - ?Box = Box, - ?BandWidth = BandWidth, - ?MeanLine = MeanLine, - ?ScaleGroup = ScaleGroup, - ?ScaleMode = ScaleMode, - ?Side = Side, - ?Span = Span, - ?SpanMode = SpanMode, - ?UseDefaults = UseDefaults - ) - - match orientation with - | StyleParam.Orientation.Horizontal -> violin |> GenericChart.mapTrace (Trace2DStyle.Violin(XEncoded = dataEncoded)) - | StyleParam.Orientation.Vertical -> violin |> GenericChart.mapTrace (Trace2DStyle.Violin(YEncoded = dataEncoded)) - - /// - /// Visualizes the distribution of the input data as a violin plot. - /// - /// A violin plot is a method of plotting numeric data. It is similar to a box plot, except that they also show the probability density of the data at different values, usually smoothed by a kernel density estimator. - /// - /// In vertical (horizontal) violin plots, statistics are computed using `y` (`x`) values. By supplying an `x` (`y`) array, one violin per distinct x (y) value is drawn If no `x` (`y`) array is provided, a single violin is drawn. That violin position is then positioned with with `name` or with `x0` (`y0`) if provided. - /// - /// Sets the xy sample data or coordinate pairs - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the violins are shown with no sample points. Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set, otherwise defaults to "outliers". - /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). - /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes - /// Sets the orientation of the violin(s). If "v" ("h"), the distribution is visualized along the vertical (horizontal). - /// Sets the width of the violin in data coordinates. If "0" (default value) the width is automatically selected based on the positions of other violin traces in the same subplot. - /// Sets the marker color. - /// Sets the marker for the violin (use this for more finegrained control than the other marker-associated arguments). - /// Sets the color of the box outline - /// Sets the width of the box outline - /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). - /// 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. - /// 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. - /// Whether and how to draw a miniature box plot - /// Sets the width of the miniature box plot - /// Sets the fill color of the miniature box plot - /// Sets the styles of the miniature box plot (use this for more finegrained control than the other box-associated arguments) - /// Sets the bandwidth used to compute the kernel density estimate. By default, the bandwidth is determined by Silverman's rule of thumb. - /// Whether and how to draw the meanline - /// If there are multiple violins that should be sized according to to some metric (see `scalemode`), link them by providing a non-empty group id here shared by every trace in the same group. If a violin's `width` is undefined, `scalegroup` will default to the trace's name. In this case, violins with the same names will be linked together - /// Sets the metric by which the width of each violin is determined."width" means each violin has the same (max) width"count" means the violins are scaled by the number of sample points makingup each violin. - /// Determines on which side of the position value the density function making up one half of a violin is plotted. Useful when comparing two violin traces under "overlay" mode, where one trace has `side` set to "positive" and the other to "negative". - /// Sets the span in data space for which the density function will be computed. Has an effect only when `spanmode` is set to "manual". - /// Sets the method by which the span in data space where the density function will be computed. "soft" means the span goes from the sample's minimum value minus two bandwidths to the sample's maximum value plus two bandwidths. "hard" means the span goes from the sample's minimum to its maximum value. For custom span settings, use mode "manual" and fill in the `span` attribute. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Violin - ( - xy: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?FillColor: Color, - ?Opacity: float, - ?Points: StyleParam.JitterPoints, - ?Jitter: float, - ?PointPos: float, - ?Orientation: StyleParam.Orientation, - ?Width: float, - ?MarkerColor: Color, - ?Marker: Marker, - ?OutlineColor: Color, - ?OutlineWidth: float, - ?Outline: Line, - ?AlignmentGroup: string, - ?OffsetGroup: string, - ?ShowBox: bool, - ?BoxWidth: float, - ?BoxFillColor: Color, - ?Box: Box, - ?BandWidth: float, - ?MeanLine: MeanLine, - ?ScaleGroup: string, - ?ScaleMode: StyleParam.ScaleMode, - ?Side: StyleParam.ViolinSide, - ?Span: StyleParam.Range, - ?SpanMode: StyleParam.SpanMode, - ?UseDefaults: bool - ) = - - let x, y = Seq.unzip xy - - Chart.Violin( - X = x, - Y = y, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?FillColor = FillColor, - ?Opacity = Opacity, - ?Points = Points, - ?Jitter = Jitter, - ?PointPos = PointPos, - ?Orientation = Orientation, - ?Width = Width, - ?MarkerColor = MarkerColor, - ?Marker = Marker, - ?OutlineColor = OutlineColor, - ?OutlineWidth = OutlineWidth, - ?Outline = Outline, - ?AlignmentGroup = AlignmentGroup, - ?OffsetGroup = OffsetGroup, - ?ShowBox = ShowBox, - ?BoxWidth = BoxWidth, - ?BoxFillColor = BoxFillColor, - ?Box = Box, - ?BandWidth = BandWidth, - ?MeanLine = MeanLine, - ?ScaleGroup = ScaleGroup, - ?ScaleMode = ScaleMode, - ?Side = Side, - ?Span = Span, - ?SpanMode = SpanMode, - ?UseDefaults = UseDefaults - ) - - - /// - /// Computes a 2D histogram contour plot, also known as a density contour plot, which is a 2-dimensional generalization of a histogram which resembles a contour plot but is computed by grouping a set of points specified by their x and y coordinates into bins, and applying an aggregation function such as count or sum (if z is provided) to compute the value to be used to compute contours. - /// - /// The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a contour plot. - /// - /// Sets the sample data to be binned on the x axis. - /// Sets the sample data to be binned on the x axis. Use two inner arrays here to plot multicategorial data - /// Sets the sample data to be binned on the y axis. - /// Sets the sample data to be binned on the y axis. Use two inner arrays here to plot multicategorial data - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets the aggregation data. - /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. - /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - /// Set the `xbingroup` and `ybingroup` default prefix For example, setting a `bingroup` of "1" on two histogram2d traces will make them their x-bins and y-bins match separately. - /// Set a group of histogram traces which will have compatible x-bin settings. Using `xbingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup` - /// Sets the binning across the x dimension - /// Set a group of histogram traces which will have compatible y-bin settings. Using `ybingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup` - /// Sets the binning across the y dimension - /// Sets the marker of this trace. - /// Sets the contour line dash style - /// Sets the contour line color - /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. - /// Sets the width of the contour lines - /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). - /// Wether or not to show the contour line - /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. - /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. - /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. - /// Determines whether to label the contour lines with their values. - /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. - /// Sets the starting contour level value. Must be less than `contours.end` - /// Sets the end contour level value. Must be more than `contours.start` - /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of `ncontours`. Has an effect only if `autocontour` is "true" or if `contours.size` is missing. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Histogram2DContour - ( - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?Y: seq<#IConvertible>, - ?MultiY: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Z: seq<#seq<#IConvertible>>, - ?HistFunc: StyleParam.HistFunc, - ?HistNorm: StyleParam.HistNorm, - ?NBinsX: int, - ?NBinsY: int, - ?BinGroup: string, - ?XBinGroup: string, - ?XBins: Bins, - ?YBinGroup: string, - ?YBins: Bins, - ?Marker: Marker, - ?ContourLinesColor: Color, - ?ContourLinesDash: StyleParam.DrawingStyle, - ?ContourLinesSmoothing: float, - ?ContourLinesWidth: float, - ?ContourLines: Line, - ?ShowContourLines: bool, - ?ContoursColoring: StyleParam.ContourColoring, - ?ContoursOperation: StyleParam.ConstraintOperation, - ?ContoursType: StyleParam.ContourType, - ?ShowContoursLabels: bool, - ?ContoursLabelFont: Font, - ?ContoursStart: float, - ?ContoursEnd: float, - ?Contours: Contours, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?NContours: int, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let showContourLines = - defaultArg ShowContourLines false - - let contourLineWidth = - ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. - - let contours = - Contours - |> Option.defaultValue (TraceObjects.Contours.init ()) - |> TraceObjects.Contours.style ( - ?Coloring = ContoursColoring, - ?Operation = ContoursOperation, - ?Start = ContoursStart, - ?End = ContoursEnd, - ?Type = ContoursType, - ?ShowLabels = ShowContoursLabels, - ?LabelFont = ContoursLabelFont - ) - - let contourLines = - ContourLines - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - Width = contourLineWidth, - ?Color = ContourLinesColor, - ?Dash = ContourLinesDash, - ?Smoothing = ContourLinesSmoothing - ) - - Trace2D.initHistogram2DContour ( - Trace2DStyle.Histogram2DContour( - ?X = X, - ?MultiX = MultiX, - ?Y = Y, - ?MultiY = MultiY, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Z = Z, - ?HistFunc = HistFunc, - ?HistNorm = HistNorm, - ?NBinsX = NBinsX, - ?NBinsY = NBinsY, - ?BinGroup = BinGroup, - ?XBinGroup = XBinGroup, - ?XBins = XBins, - ?YBinGroup = YBinGroup, - ?YBins = YBins, - ?Marker = Marker, - Line = contourLines, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - Contours = contours, - ?NContours = NContours - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Computes a 2D histogram contour plot from encoded input data. - /// - /// Sets the sample data to be binned on the x axis as an encoded typed array. - /// Sets the sample data to be binned on the y axis as an encoded typed array. - /// Sets the aggregation data as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Specifies the binning function used for this histogram trace. - /// Specifies the type of normalization used for this histogram trace. - /// Specifies the maximum number of desired bins. - /// Specifies the maximum number of desired bins. - /// Set the `xbingroup` and `ybingroup` default prefix. - /// Set a group of histogram traces which will have compatible x-bin settings. - /// Sets the binning across the x dimension - /// Set a group of histogram traces which will have compatible y-bin settings. - /// Sets the binning across the y dimension - /// Sets the marker of this trace. - /// Sets the contour line dash style - /// Sets the contour line color - /// Sets the amount of smoothing for the contour lines. - /// Sets the width of the contour lines - /// Sets the contour lines. - /// Wether or not to show the contour line - /// Determines the coloring method showing the contour values. - /// Sets the constraint operation. - /// Sets the contour representation type. - /// Determines whether to label the contour lines with their values. - /// Sets the font used for labeling the contour levels. - /// Sets the starting contour level value. - /// Sets the end contour level value. - /// Sets the styles of the contours. - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. - /// Sets the maximum number of contour levels. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Histogram2DContour - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?zEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?HistFunc: StyleParam.HistFunc, - ?HistNorm: StyleParam.HistNorm, - ?NBinsX: int, - ?NBinsY: int, - ?BinGroup: string, - ?XBinGroup: string, - ?XBins: Bins, - ?YBinGroup: string, - ?YBins: Bins, - ?Marker: Marker, - ?ContourLinesColor: Color, - ?ContourLinesDash: StyleParam.DrawingStyle, - ?ContourLinesSmoothing: float, - ?ContourLinesWidth: float, - ?ContourLines: Line, - ?ShowContourLines: bool, - ?ContoursColoring: StyleParam.ContourColoring, - ?ContoursOperation: StyleParam.ConstraintOperation, - ?ContoursType: StyleParam.ContourType, - ?ShowContoursLabels: bool, - ?ContoursLabelFont: Font, - ?ContoursStart: float, - ?ContoursEnd: float, - ?Contours: Contours, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?NContours: int, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let showContourLines = - defaultArg ShowContourLines false - - let contourLineWidth = - ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. - - let contours = - Contours - |> Option.defaultValue (TraceObjects.Contours.init ()) - |> TraceObjects.Contours.style ( - ?Coloring = ContoursColoring, - ?Operation = ContoursOperation, - ?Start = ContoursStart, - ?End = ContoursEnd, - ?Type = ContoursType, - ?ShowLabels = ShowContoursLabels, - ?LabelFont = ContoursLabelFont - ) - - let contourLines = - ContourLines - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - Width = contourLineWidth, - ?Color = ContourLinesColor, - ?Dash = ContourLinesDash, - ?Smoothing = ContourLinesSmoothing - ) - - Trace2D.initHistogram2DContour ( - Trace2DStyle.Histogram2DContour( - XEncoded = xEncoded, - YEncoded = yEncoded, - ?ZEncoded = zEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?HistFunc = HistFunc, - ?HistNorm = HistNorm, - ?NBinsX = NBinsX, - ?NBinsY = NBinsY, - ?BinGroup = BinGroup, - ?XBinGroup = XBinGroup, - ?XBins = XBins, - ?YBinGroup = YBinGroup, - ?YBins = YBins, - ?Marker = Marker, - Line = contourLines, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - Contours = contours, - ?NContours = NContours - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Computes a 2D histogram contour plot, also known as a density contour plot, which is a 2-dimensional generalization of a histogram which resembles a contour plot but is computed by grouping a set of points specified by their x and y coordinates into bins, and applying an aggregation function such as count or sum (if z is provided) to compute the value to be used to compute contours. - /// - /// The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a contour plot. - /// - /// Sets the sample data to be binned on the x axis. - /// Sets the sample data to be binned on the y axis. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets the aggregation data. - /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. - /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. - /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - /// Set the `xbingroup` and `ybingroup` default prefix For example, setting a `bingroup` of "1" on two histogram2d traces will make them their x-bins and y-bins match separately. - /// Set a group of histogram traces which will have compatible x-bin settings. Using `xbingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup` - /// Sets the binning across the x dimension - /// Set a group of histogram traces which will have compatible y-bin settings. Using `ybingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup` - /// Sets the binning across the y dimension - /// Sets the marker of this trace. - /// Sets the contour line dash style - /// Sets the contour line color - /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. - /// Sets the width of the contour lines - /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). - /// Wether or not to show the contour line - /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. - /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. - /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. - /// Determines whether to label the contour lines with their values. - /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. - /// Sets the starting contour level value. Must be less than `contours.end` - /// Sets the end contour level value. Must be more than `contours.start` - /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of `ncontours`. Has an effect only if `autocontour` is "true" or if `contours.size` is missing. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Histogram2DContour - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Z: seq<#seq<#IConvertible>>, - ?HistFunc: StyleParam.HistFunc, - ?HistNorm: StyleParam.HistNorm, - ?NBinsX: int, - ?NBinsY: int, - ?BinGroup: string, - ?XBinGroup: string, - ?XBins: Bins, - ?YBinGroup: string, - ?YBins: Bins, - ?Marker: Marker, - ?ContourLinesColor: Color, - ?ContourLinesDash: StyleParam.DrawingStyle, - ?ContourLinesSmoothing: float, - ?ContourLinesWidth: float, - ?ContourLines: Line, - ?ShowContourLines: bool, - ?ContoursColoring: StyleParam.ContourColoring, - ?ContoursOperation: StyleParam.ConstraintOperation, - ?ContoursType: StyleParam.ContourType, - ?ShowContoursLabels: bool, - ?ContoursLabelFont: Font, - ?ContoursStart: float, - ?ContoursEnd: float, - ?Contours: Contours, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?NContours: int, - ?UseDefaults: bool - ) = - Chart.Histogram2DContour( - X = x, - Y = y, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Z = Z, - ?HistFunc = HistFunc, - ?HistNorm = HistNorm, - ?NBinsX = NBinsX, - ?NBinsY = NBinsY, - ?BinGroup = BinGroup, - ?XBinGroup = XBinGroup, - ?XBins = XBins, - ?YBinGroup = YBinGroup, - ?YBins = YBins, - ?Marker = Marker, - ?ContourLinesColor = ContourLinesColor, - ?ContourLinesDash = ContourLinesDash, - ?ContourLinesSmoothing = ContourLinesSmoothing, - ?ContourLinesWidth = ContourLinesWidth, - ?ContourLines = ContourLines, - ?ShowContourLines= ShowContourLines, - ?ContoursColoring = ContoursColoring, - ?ContoursOperation = ContoursOperation, - ?ContoursType = ContoursType, - ?ShowContoursLabels = ShowContoursLabels, - ?ContoursLabelFont = ContoursLabelFont, - ?ContoursStart = ContoursStart, - ?ContoursEnd = ContoursEnd, - ?Contours = Contours, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?NContours = NContours, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a heatmap. - /// - /// A heatmap is a data visualization technique that shows magnitude of a phenomenon as color in two dimensions. - /// - /// Sets the 2-dimensional z data, which will be visualized with the color scale. - /// Sets the x coordinates - /// Sets the x coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the y coordinates - /// Sets the y coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets the horizontal gap (in pixels) between bricks. - /// Sets the vertical gap (in pixels) between bricks. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Picks a smoothing algorithm use to smooth `z` data. - /// Transposes the z data. - /// Whether or not to use WebGL to render this trace - /// Whether or not to reverse the y axis. If true, (0,0) will lie on the top left and increase downwards. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Heatmap - ( - zData: seq<#seq<#IConvertible>>, - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?Y: seq<#IConvertible>, - ?MultiY: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?XGap: int, - ?YGap: int, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?ZSmooth: StyleParam.SmoothAlg, - ?Transpose: bool, - ?UseWebGL: bool, - ?ReverseYAxis: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let reverseYAxis = - defaultArg ReverseYAxis false - - let style = - Trace2DStyle.Heatmap( - Z = zData, - ?X = X, - ?MultiX = MultiX, - ?Y = Y, - ?MultiY = MultiY, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?XGap = XGap, - ?YGap = YGap, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?ZSmooth = ZSmooth, - ?Transpose = Transpose - ) - - let useWebGL = defaultArg UseWebGL false - - Chart.renderHeatmapTrace useDefaults useWebGL style - |> fun c -> - if reverseYAxis then - c |> Chart.withYAxis (LinearAxis.init (AutoRange = StyleParam.AutoRange.Reversed)) - else - c - - /// - /// Creates a heatmap from an encoded z matrix and optional encoded axes. - /// - /// Sets the 2-dimensional z data as an encoded typed array. - /// Sets the x coordinates as an encoded typed array. - /// Sets the y coordinates as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets the horizontal gap (in pixels) between bricks. - /// Sets the vertical gap (in pixels) between bricks. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. - /// Picks a smoothing algorithm use to smooth `z` data. - /// Transposes the z data. - /// Whether or not to use WebGL to render this trace - /// Whether or not to reverse the y axis. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Heatmap - ( - zEncoded: EncodedTypedArray, - ?xEncoded: EncodedTypedArray, - ?yEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?XGap: int, - ?YGap: int, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?ZSmooth: StyleParam.SmoothAlg, - ?Transpose: bool, - ?UseWebGL: bool, - ?ReverseYAxis: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let reverseYAxis = - defaultArg ReverseYAxis false - - let style = - Trace2DStyle.Heatmap( - ZEncoded = zEncoded, - ?XEncoded = xEncoded, - ?YEncoded = yEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?XGap = XGap, - ?YGap = YGap, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?ZSmooth = ZSmooth, - ?Transpose = Transpose - ) - - let useWebGL = defaultArg UseWebGL false - - Chart.renderHeatmapTrace useDefaults useWebGL style - |> fun c -> - if reverseYAxis then - c |> Chart.withYAxis (LinearAxis.init (AutoRange = StyleParam.AutoRange.Reversed)) - else - c - - /// - /// Creates a heatmap. - /// - /// A heatmap is a data visualization technique that shows magnitude of a phenomenon as color in two dimensions. - /// - /// Sets the 2-dimensional z data, which will be visualized with the color scale. - /// Sets names for each column (as x coordinates) - /// Sets names for each row (as y coordinates) - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets the horizontal gap (in pixels) between bricks. - /// Sets the vertical gap (in pixels) between bricks. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Picks a smoothing algorithm use to smooth `z` data. - /// Transposes the z data. - /// Whether or not to use WebGL to render this trace - /// Whether or not to reverse the y axis. If true, (0,0) will lie on the top left and increase downwards. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Heatmap - ( - zData: seq<#seq<#IConvertible>>, - colNames: seq, - rowNames: seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?XGap: int, - ?YGap: int, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?ZSmooth: StyleParam.SmoothAlg, - ?Transpose: bool, - ?UseWebGL: bool, - ?ReverseYAxis: bool, - ?UseDefaults: bool - ) = - - Chart.Heatmap( - zData = zData, - X = colNames, - Y = rowNames, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?XGap = XGap, - ?YGap = YGap, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?ZSmooth = ZSmooth, - ?Transpose = Transpose, - ?UseWebGL = UseWebGL, - ?ReverseYAxis = ReverseYAxis, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a annotated heatmap. - /// - /// A heatmap is a data visualization technique that shows magnitude of a phenomenon as color in two dimensions. - /// - /// The annotated heatmap additionally contains annotation text on each datum. - /// - /// Sets the 2-dimensional z data, which will be visualized with the color scale. - /// Sets the text to display as annotation for each datum. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets the x coordinates. - /// Sets the x coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the horizontal gap (in pixels) between bricks. - /// Sets the y coordinates. - /// Sets the y coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the vertical gap (in pixels) between bricks. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Picks a smoothing algorithm use to smooth `z` data. - /// Transposes the z data. - /// Whether or not to use WebGL to render this trace - /// Whether or not to reverse the y axis. If true, (0,0) will lie on the top left and increase downwards. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member AnnotatedHeatmap - ( - zData: seq<#seq<#IConvertible>>, - annotationText: seq<#seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?XGap: int, - ?Y: seq<#IConvertible>, - ?MultiY: seq>, - ?YGap: int, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?ZSmooth: StyleParam.SmoothAlg, - ?Transpose: bool, - ?UseWebGL: bool, - ?ReverseYAxis: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let reverseYAxis = - defaultArg ReverseYAxis false - - let dims = Seq.length zData - let dims2 = Seq.length annotationText - - if dims <> dims2 then - failwith "incompatible dims" - - let style = - Trace2DStyle.Heatmap( - Z = zData, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?X = X, - ?MultiX = MultiX, - ?XGap = XGap, - ?Y = Y, - ?MultiY = MultiY, - ?YGap = YGap, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?ZSmooth = ZSmooth, - ?Transpose = Transpose - ) - - let useWebGL = defaultArg UseWebGL false - - Chart.renderHeatmapTrace useDefaults useWebGL style - |> fun c -> - if reverseYAxis then - c |> Chart.withYAxis (LinearAxis.init (AutoRange = StyleParam.AutoRange.Reversed)) - else - c - |> Chart.withAnnotations ( - annotationText - |> Seq.mapi (fun y inner -> - inner |> Seq.mapi (fun x text -> Annotation.init (x, y, Text = (string text), ShowArrow = false))) - |> Seq.concat - ) - - - /// - /// Creates a annotated heatmap. - /// - /// A heatmap is a data visualization technique that shows magnitude of a phenomenon as color in two dimensions. - /// - /// The annotated heatmap additionally contains annotation text on each datum. - /// - /// Sets the 2-dimensional z data, which will be visualized with the color scale together with the respective annotation text. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets the x coordinates. - /// Sets the x coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the horizontal gap (in pixels) between bricks. - /// Sets the y coordinates. - /// Sets the y coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the vertical gap (in pixels) between bricks. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Picks a smoothing algorithm use to smooth `z` data. - /// Transposes the z data. - /// Whether or not to use WebGL to render this trace - /// Whether or not to reverse the y axis. If true, (0,0) will lie on the top left and increase downwards. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member AnnotatedHeatmap - ( - dataAnnotations: seq<#seq<#IConvertible * string>>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?XGap: int, - ?Y: seq<#IConvertible>, - ?MultiY: seq>, - ?YGap: int, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?ZSmooth: StyleParam.SmoothAlg, - ?Transpose: bool, - ?UseWebGL: bool, - ?ReverseYAxis: bool, - ?UseDefaults: bool - ) = - - let zData = - dataAnnotations |> Seq.map (Seq.map fst) - - let annotationText = - dataAnnotations |> Seq.map (Seq.map snd) - - Chart.AnnotatedHeatmap( - zData = zData, - annotationText = annotationText, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?X = X, - ?MultiX = MultiX, - ?XGap = XGap, - ?Y = Y, - ?MultiY = MultiY, - ?YGap = YGap, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?ZSmooth = ZSmooth, - ?Transpose = Transpose, - ?UseWebGL = UseWebGL, - ?ReverseYAxis = ReverseYAxis, - ?UseDefaults = UseDefaults - ) - - /// - /// Display an image, i.e. data on a 2D regular raster. By default, when an image is displayed in a subplot, its y axis will be reversed (ie. `autorange: 'reversed'`), constrained to the domain (ie. `constrain: 'domain'`) and it will have the same scale as its x axis (ie. `scaleanchor: 'x,`) in order for pixels to be rendered as squares. - /// - /// A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color. - /// Specifies the data URI of the image to be visualized. The URI consists of "data:image/[<media subtype>][;base64],<data>" - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. - /// Color model used to map the numerical color components described in `z` into colors. If `source` is specified, this attribute will be set to `rgba256` otherwise it defaults to `rgb`. - /// Sets the upper bound of the color domain. Value should have the same units as in `z` and if set, `zmin` must be set as well. - /// Sets the lower bound of the color domain. Value should have the same units as in `z` and if set, `zmax` must be set as well. - /// Picks a smoothing algorithm use to smooth `z` data. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Image - ( - ?Z: seq<#seq<#seq>>, - ?Source: string, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Ids: seq<#IConvertible>, - ?ColorModel: StyleParam.ColorModel, - ?ZMax: StyleParam.ColorComponentBound, - ?ZMin: StyleParam.ColorComponentBound, - ?ZSmooth: StyleParam.SmoothAlg, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - Trace2D.initImage ( - Trace2DStyle.Image( - ?Z = Z, - ?Source = Source, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Ids = Ids, - ?ColorModel = ColorModel, - ?ZMax = ZMax, - ?ZMin = ZMin, - ?ZSmooth = ZSmooth - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Display an image, i.e. data on a 2D regular raster. By default, when an image is displayed in a subplot, its y axis will be reversed (ie. `autorange: 'reversed'`), constrained to the domain (ie. `constrain: 'domain'`) and it will have the same scale as its x axis (ie. `scaleanchor: 'x,`) in order for pixels to be rendered as squares. - /// - /// A 2-dimensional array containing Plotly.NETs ARGB color object. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. - /// Sets the upper bound of the color domain. Value should have the same units as in `z` and if set, `zmin` must be set as well. - /// Sets the lower bound of the color domain. Value should have the same units as in `z` and if set, `zmax` must be set as well. - /// Picks a smoothing algorithm use to smooth `z` data. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Image - ( - z: seq<#seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Ids: seq<#IConvertible>, - ?ZMax: StyleParam.ColorComponentBound, - ?ZMin: StyleParam.ColorComponentBound, - ?ZSmooth: StyleParam.SmoothAlg, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let z' = - z - |> Seq.map ( - Seq.map (fun argb -> - seq { - int argb.R - int argb.G - int argb.B - int argb.A - }) - ) - - - Trace2D.initImage ( - Trace2DStyle.Image( - Z = z', - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Ids = Ids, - ColorModel = StyleParam.ColorModel.RGBA, - ?ZMax = ZMax, - ?ZMin = ZMin, - ?ZSmooth = ZSmooth - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a 2D contour plot, which shows the contour lines of a 2D numerical array z, i.e. interpolated lines of isovalues of z. - /// - /// A contour line (also isoline, isopleth, or isarithm) of a function of two variables is a curve along which the function has a constant value, so that the curve joins points of equal value - /// - /// The data from which contour lines are computed is set in `z`. Data in `z` must be a 2D array of numbers. Say that `z` has N rows and M columns, then by default, these N rows correspond to N y coordinates (set in `y` or auto-generated) and the M columns correspond to M x coordinates (set in `x` or auto-generated). By setting `transpose` to "true", the above behavior is flipped. - /// - /// Sets the z data which is used for computing the contour lines. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets the x coordinates. - /// Sets the x coordinates. Use two inner arrays here to plot multicategorial data - /// Sets the y coordinates. - /// Sets the y coordinates. Use two inner arrays here to plot multicategorial data - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Transposes the z data. - /// Sets the contour line dash style - /// Sets the contour line color - /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. - /// Sets the width of the contour lines - /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). - /// Wether or not to show the contour line - /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. - /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. - /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. - /// Determines whether to label the contour lines with their values. - /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. - /// Sets the starting contour level value. Must be less than `contours.end` - /// Sets the end contour level value. Must be more than `contours.start` - /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). - /// Sets the fill color if `contours.type` is "constraint". Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. - /// Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of `ncontours`. Has an effect only if `autocontour` is "true" or if `contours.size` is missing. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Contour - ( - zData: seq<#seq<#IConvertible>>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?Y: seq<#IConvertible>, - ?MultiY: seq>, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?Transpose: bool, - ?ContourLinesColor: Color, - ?ContourLinesDash: StyleParam.DrawingStyle, - ?ContourLinesSmoothing: float, - ?ContourLinesWidth: float, - ?ContourLines: Line, - ?ShowContourLines: bool, - ?ContoursColoring: StyleParam.ContourColoring, - ?ContoursOperation: StyleParam.ConstraintOperation, - ?ContoursType: StyleParam.ContourType, - ?ShowContoursLabels: bool, - ?ContoursLabelFont: Font, - ?ContoursStart: float, - ?ContoursEnd: float, - ?Contours: Contours, - ?FillColor: Color, - ?NContours: int, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let showContourLines = - defaultArg ShowContourLines false - - let contourLinesWidth = - ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. - - let contours = - Contours - |> Option.defaultValue (TraceObjects.Contours.init ()) - |> TraceObjects.Contours.style ( - ?Coloring = ContoursColoring, - ?Operation = ContoursOperation, - ?Start = ContoursStart, - ?End = ContoursEnd, - ?Type = ContoursType, - ?ShowLabels = ShowContoursLabels, - ?LabelFont = ContoursLabelFont - ) - - let contourLines = - ContourLines - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - Width = contourLinesWidth, - ?Color = ContourLinesColor, - ?Dash = ContourLinesDash, - ?Smoothing = ContourLinesSmoothing - ) - - Trace2D.initContour ( - Trace2DStyle.Contour( - Z = zData, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?X = X, - ?MultiX = MultiX, - ?Y = Y, - ?MultiY = MultiY, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?Transpose = Transpose, - ?FillColor = FillColor, - ?NContours = NContours, - Contours = contours, - Line = contourLines - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a contour chart from an encoded z matrix and optional encoded axes. - /// - /// Sets the 2-dimensional z data as an encoded typed array. - /// Sets the x coordinates as an encoded typed array. - /// Sets the y coordinates as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the styles of the colorbar for this trace. - /// Sets the colorscale for this trace. - /// Whether or not to show the colorscale/colorbar - /// Reverses the color mapping if true. - /// Transposes the z data. - /// Sets the contour line dash style - /// Sets the contour line color - /// Sets the amount of smoothing for the contour lines. - /// Sets the width of the contour lines - /// Sets the contour lines. - /// Wether or not to show the contour line - /// Determines the coloring method showing the contour values. - /// Sets the constraint operation. - /// Sets the contour representation type. - /// Determines whether to label the contour lines with their values. - /// Sets the font used for labeling the contour levels. - /// Sets the starting contour level value. - /// Sets the end contour level value. - /// Sets the styles of the contours. - /// Sets the fill color if `contours.type` is "constraint". - /// Sets the maximum number of contour levels. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Contour - ( - zEncoded: EncodedTypedArray, - ?xEncoded: EncodedTypedArray, - ?yEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?Transpose: bool, - ?ContourLinesColor: Color, - ?ContourLinesDash: StyleParam.DrawingStyle, - ?ContourLinesSmoothing: float, - ?ContourLinesWidth: float, - ?ContourLines: Line, - ?ShowContourLines: bool, - ?ContoursColoring: StyleParam.ContourColoring, - ?ContoursOperation: StyleParam.ConstraintOperation, - ?ContoursType: StyleParam.ContourType, - ?ShowContoursLabels: bool, - ?ContoursLabelFont: Font, - ?ContoursStart: float, - ?ContoursEnd: float, - ?Contours: Contours, - ?FillColor: Color, - ?NContours: int, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let showContourLines = - defaultArg ShowContourLines false - - let contourLinesWidth = - ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. - - let contours = - Contours - |> Option.defaultValue (TraceObjects.Contours.init ()) - |> TraceObjects.Contours.style ( - ?Coloring = ContoursColoring, - ?Operation = ContoursOperation, - ?Start = ContoursStart, - ?End = ContoursEnd, - ?Type = ContoursType, - ?ShowLabels = ShowContoursLabels, - ?LabelFont = ContoursLabelFont - ) - - let contourLines = - ContourLines - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - Width = contourLinesWidth, - ?Color = ContourLinesColor, - ?Dash = ContourLinesDash, - ?Smoothing = ContourLinesSmoothing - ) - - Trace2D.initContour ( - Trace2DStyle.Contour( - ZEncoded = zEncoded, - ?XEncoded = xEncoded, - ?YEncoded = yEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?Transpose = Transpose, - ?FillColor = FillColor, - ?NContours = NContours, - Contours = contours, - Line = contourLines - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates an OHLC chart. - /// - /// The ohlc (short for Open-High-Low-Close) is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The tip of the lines represent the `low` and `high` values and the horizontal segments represent the `open` and `close` values. Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing items are drawn in green whereas decreasing are drawn in red. - /// - /// Sets the open values. - /// Sets the high values. - /// Sets the low values. - /// Sets the close values. - /// Sets the x coordinates. If absent, linear coordinate will be generated. - /// Sets the x coordinates. If absent, linear coordinate will be generated. Use two inner arrays here to plot multicategorial data - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the line of this trace. - /// Sets the color of increasing values - /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of decreasing values - /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the width of the open/close tick marks relative to the "x" minimal interval. - /// Whether or not to show a rangeslider for the xaxis - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member OHLC - ( - ``open``: #IConvertible seq, - high: #IConvertible seq, - low: #IConvertible seq, - close: #IConvertible seq, - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Line: Line, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?TickWidth: float, - ?ShowXAxisRangeSlider: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let increasing = - Increasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?LineColor = IncreasingColor) - - let decreasing = - Decreasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?LineColor = DecreasingColor) - - Trace2D.initOHLC ( - Trace2DStyle.OHLC( - Open = ``open``, - High = high, - Low = low, - Close = close, - ?X = X, - ?MultiX = MultiX, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Line = Line, - Increasing = increasing, - Decreasing = decreasing, - ?TickWidth = TickWidth - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () - |> Layout.setLinearAxis ( - id = StyleParam.SubPlotId.XAxis 1, - axis = LinearAxis.init (RangeSlider = RangeSlider.init (?Visible = ShowXAxisRangeSlider)) - ) - ) - - /// - /// Creates an OHLC chart. - /// - /// The ohlc (short for Open-High-Low-Close) is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The tip of the lines represent the `low` and `high` values and the horizontal segments represent the `open` and `close` values. Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing items are drawn in green whereas decreasing are drawn in red. - /// - /// Sets the open values. - /// Sets the high values. - /// Sets the low values. - /// Sets the close values. - /// Sets the x coordinates. If absent, linear coordinate will be generated. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the line of this trace. - /// Sets the color of increasing values - /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of decreasing values - /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the width of the open/close tick marks relative to the "x" minimal interval. - /// Whether or not to show a rangeslider for the xaxis - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member OHLC - ( - ``open``: #IConvertible seq, - high: #IConvertible seq, - low: #IConvertible seq, - close: #IConvertible seq, - x: #IConvertible seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Line: Line, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?TickWidth: float, - ?ShowXAxisRangeSlider: bool, - ?UseDefaults: bool - ) = - - Chart.OHLC( - ``open`` = ``open``, - high = high, - low = low, - close = close, - X = x, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Line = Line, - ?IncreasingColor = IncreasingColor, - ?Increasing = Increasing, - ?DecreasingColor = DecreasingColor, - ?Decreasing = Decreasing, - ?TickWidth = TickWidth, - ?ShowXAxisRangeSlider = ShowXAxisRangeSlider, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates an OHLC chart from encoded financial arrays. - /// - /// Sets the open values as an encoded typed array. - /// Sets the high values as an encoded typed array. - /// Sets the low values as an encoded typed array. - /// Sets the close values as an encoded typed array. - /// Sets the x coordinates as an encoded typed array. If absent, linear coordinates will be generated. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the line of this trace. - /// Sets the color of increasing values - /// Sets the style options of increasing values. - /// Sets the color of decreasing values - /// Sets the style options of decreasing values. - /// Sets the width of the open/close tick marks. - /// Whether or not to show a rangeslider for the xaxis - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member OHLC - ( - openEncoded: EncodedTypedArray, - highEncoded: EncodedTypedArray, - lowEncoded: EncodedTypedArray, - closeEncoded: EncodedTypedArray, - ?xEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Line: Line, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?TickWidth: float, - ?ShowXAxisRangeSlider: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let increasing = - Increasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?LineColor = IncreasingColor) - - let decreasing = - Decreasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?LineColor = DecreasingColor) - - Trace2D.initOHLC ( - Trace2DStyle.OHLC( - OpenEncoded = openEncoded, - HighEncoded = highEncoded, - LowEncoded = lowEncoded, - CloseEncoded = closeEncoded, - ?XEncoded = xEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Line = Line, - Increasing = increasing, - Decreasing = decreasing, - ?TickWidth = TickWidth - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () - |> Layout.setLinearAxis ( - id = StyleParam.SubPlotId.XAxis 1, - axis = LinearAxis.init (RangeSlider = RangeSlider.init (?Visible = ShowXAxisRangeSlider)) - ) - ) - - /// - /// Creates an OHLC chart. - /// - /// The ohlc (short for Open-High-Low-Close) is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The tip of the lines represent the `low` and `high` values and the horizontal segments represent the `open` and `close` values. Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing items are drawn in green whereas decreasing are drawn in red. - /// - /// a series of (time,StockData), where StockData contains opwn, high, low and close values. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the line of this trace. - /// Sets the color of increasing values - /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of decreasing values - /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the width of the open/close tick marks relative to the "x" minimal interval. - /// Whether or not to show a rangeslider for the xaxis - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member OHLC - ( - stockTimeSeries: seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Line: Line, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?TickWidth: float, - ?ShowXAxisRangeSlider: bool, - ?UseDefaults: bool - ) = - - Chart.OHLC( - ``open`` = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Open))), - high = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.High))), - low = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Low))), - close = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Close))), - x = (stockTimeSeries |> Seq.map fst), - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Line = Line, - ?IncreasingColor = IncreasingColor, - ?Increasing = Increasing, - ?DecreasingColor = DecreasingColor, - ?Decreasing = Decreasing, - ?TickWidth = TickWidth, - ?ShowXAxisRangeSlider = ShowXAxisRangeSlider, - ?UseDefaults = UseDefaults - ) - - - - /// - /// Creates a candlestick chart. - /// - /// The candlestick is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The boxes represent the spread between the `open` and `close` values and the lines represent the spread between the `low` and `high` values Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing candles are drawn in green whereas decreasing are drawn in red. - /// - /// Sets the open values. - /// Sets the high values. - /// Sets the low values. - /// Sets the close values. - /// Sets the x coordinates. If absent, linear coordinate will be generated. - /// Sets the x coordinates. If absent, linear coordinate will be generated. Use two inner arrays here to plot multicategorial data - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the line of this trace. - /// Sets the color of increasing values - /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of decreasing values - /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). - /// Whether or not to show a rangeslider for the xaxis - /// If set to false, ignore the global default settings set in `Defaults` - static member Candlestick - ( - ``open``: #IConvertible seq, - high: #IConvertible seq, - low: #IConvertible seq, - close: #IConvertible seq, - ?X: seq<#IConvertible>, - ?MultiX: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Line: Line, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?WhiskerWidth: float, - ?ShowXAxisRangeSlider: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let increasing = - Increasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?LineColor = IncreasingColor) - - let decreasing = - Decreasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?LineColor = DecreasingColor) - - Trace2D.initCandlestick ( - Trace2DStyle.Candlestick( - Open = ``open``, - High = high, - Low = low, - Close = close, - ?X = X, - ?MultiX = MultiX, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Line = Line, - Increasing = increasing, - Decreasing = decreasing, - ?WhiskerWidth = WhiskerWidth - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () - |> Layout.setLinearAxis ( - id = StyleParam.SubPlotId.XAxis 1, - axis = LinearAxis.init (RangeSlider = RangeSlider.init (?Visible = ShowXAxisRangeSlider)) - ) - ) - - /// - /// Creates a candlestick chart. - /// - /// The candlestick is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The boxes represent the spread between the `open` and `close` values and the lines represent the spread between the `low` and `high` values Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing candles are drawn in green whereas decreasing are drawn in red. - /// - /// Sets the open values. - /// Sets the high values. - /// Sets the low values. - /// Sets the close values. - /// Sets the x coordinates. If absent, linear coordinate will be generated. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the line of this trace. - /// Sets the color of increasing values - /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of decreasing values - /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). - /// Whether or not to show a rangeslider for the xaxis - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Candlestick - ( - ``open``: #IConvertible seq, - high: #IConvertible seq, - low: #IConvertible seq, - close: #IConvertible seq, - x: #IConvertible seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Line: Line, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?WhiskerWidth: float, - ?ShowXAxisRangeSlider: bool, - ?UseDefaults: bool - ) = - - Chart.Candlestick( - ``open`` = ``open``, - high = high, - low = low, - close = close, - X = x, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Line = Line, - ?IncreasingColor = IncreasingColor, - ?Increasing = Increasing, - ?DecreasingColor = DecreasingColor, - ?Decreasing = Decreasing, - ?WhiskerWidth = WhiskerWidth, - ?ShowXAxisRangeSlider = ShowXAxisRangeSlider, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a candlestick chart from encoded financial arrays. - /// - /// Sets the open values as an encoded typed array. - /// Sets the high values as an encoded typed array. - /// Sets the low values as an encoded typed array. - /// Sets the close values as an encoded typed array. - /// Sets the x coordinates as an encoded typed array. If absent, linear coordinates will be generated. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity of the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the line of this trace. - /// Sets the color of increasing values - /// Sets the style options of increasing values. - /// Sets the color of decreasing values - /// Sets the style options of decreasing values. - /// Sets the width of the whiskers relative to the box' width. - /// Whether or not to show a rangeslider for the xaxis - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Candlestick - ( - openEncoded: EncodedTypedArray, - highEncoded: EncodedTypedArray, - lowEncoded: EncodedTypedArray, - closeEncoded: EncodedTypedArray, - ?xEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Line: Line, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?WhiskerWidth: float, - ?ShowXAxisRangeSlider: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let increasing = - Increasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?LineColor = IncreasingColor) - - let decreasing = - Decreasing - |> Option.defaultValue (FinanceMarker.init ()) - |> FinanceMarker.style (?LineColor = DecreasingColor) - - Trace2D.initCandlestick ( - Trace2DStyle.Candlestick( - OpenEncoded = openEncoded, - HighEncoded = highEncoded, - LowEncoded = lowEncoded, - CloseEncoded = closeEncoded, - ?XEncoded = xEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Line = Line, - Increasing = increasing, - Decreasing = decreasing, - ?WhiskerWidth = WhiskerWidth - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () - |> Layout.setLinearAxis ( - id = StyleParam.SubPlotId.XAxis 1, - axis = LinearAxis.init (RangeSlider = RangeSlider.init (?Visible = ShowXAxisRangeSlider)) - ) - ) - - /// - /// Creates a candlestick chart. - /// - /// The candlestick is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The boxes represent the spread between the `open` and `close` values and the lines represent the spread between the `low` and `high` values Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing candles are drawn in green whereas decreasing are drawn in red. - /// - /// a series of (time,StockData), where StockData contains opwn, high, low and close values. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the line of this trace. - /// Sets the color of increasing values - /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the color of decreasing values - /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). - /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). - /// Whether or not to show a rangeslider for the xaxis - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Candlestick - ( - stockTimeSeries: seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Line: Line, - ?IncreasingColor: Color, - ?Increasing: FinanceMarker, - ?DecreasingColor: Color, - ?Decreasing: FinanceMarker, - ?WhiskerWidth: float, - ?ShowXAxisRangeSlider: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - Chart.Candlestick( - ``open`` = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Open))), - high = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.High))), - low = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Low))), - close = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Close))), - x = (stockTimeSeries |> Seq.map fst), - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Line = Line, - ?IncreasingColor = IncreasingColor, - ?Increasing = Increasing, - ?DecreasingColor = DecreasingColor, - ?Decreasing = Decreasing, - ?WhiskerWidth = WhiskerWidth, - ?ShowXAxisRangeSlider = ShowXAxisRangeSlider, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a scatter plot matrix (SPLOM) from multiple input dimensions. - /// - /// Each splom `dimensions` items correspond to a generated axis. Values for each of those dimensions are set in `dimensions[i].values`. Splom traces support all `scattergl` marker style attributes. Specify `layout.grid` attributes and/or layout x-axis and y-axis attributes for more control over the axis positioning and style. - /// - /// Sets the dimensions of the scatter plot matrix, where each item corresponds to a generated axis. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the marker. - /// Sets the colorscale of the marker. Use `Color.fromColorScaleValues` to map marker colors to a colorscale. - /// Sets the outline of the marker - /// Sets the symbol of all marker - /// Sets the symbol of each individual marker - /// Sets the markers (use this for more finegrained control than the other marker-associated arguments). - /// Whether or not to show the matrix diagional - /// Sets the styles applied to the scatter plot matrix diagonal - /// Determines whether or not subplots on the lower half from the diagonal are displayed. - /// Determines whether or not subplots on the upper half from the diagonal are displayed. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Splom - ( - dimensions: seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?ShowDiagonal: bool, - ?Diagonal: SplomDiagonal, - ?ShowLowerHalf: bool, - ?ShowUpperHalf: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale - ) - - let diagonal = - Diagonal - |> Option.defaultValue (TraceObjects.SplomDiagonal.init ()) - |> TraceObjects.SplomDiagonal.style (?Visible = ShowDiagonal) - - Trace2D.initSplom ( - Trace2DStyle.Splom( - Dimensions = dimensions, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - Marker = marker, - Diagonal = diagonal, - ?ShowLowerHalf = ShowLowerHalf, - ?ShowUpperHalf = ShowUpperHalf - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a scatter plot matrix (SPLOM) from multiple input dimensions. - /// - /// Each splom `dimensions` items correspond to a generated axis. Values for each of those dimensions are set in `dimensions[i].values`. Splom traces support all `scattergl` marker style attributes. Specify `layout.grid` attributes and/or layout x-axis and y-axis attributes for more control over the axis positioning and style. - /// - /// Sets the dimensions of the scatter plot matrix as (dimensionKey,dimensionValues) pairs, where each such pair corresponds to a generated axis. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the marker. - /// Sets the colorscale of the marker. Use `Color.fromColorScaleValues` to map marker colors to a colorscale. - /// Sets the outline of the marker - /// Sets the symbol of all marker - /// Sets the symbol of each individual marker - /// Sets the markers (use this for more finegrained control than the other marker-associated arguments). - /// Whether or not to show the matrix diagional - /// Sets the styles applied to the scatter plot matrix diagonal - /// Determines whether or not subplots on the lower half from the diagonal are displayed. - /// Determines whether or not subplots on the upper half from the diagonal are displayed. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Splom - ( - keyValues: seq>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?ShowDiagonal: bool, - ?Diagonal: SplomDiagonal, - ?ShowLowerHalf: bool, - ?ShowUpperHalf: bool, - ?UseDefaults: bool - ) = - - let dims = - keyValues |> Seq.map (fun (key, vals) -> Dimension.initSplom (Label = key, Values = vals)) - - Chart.Splom( - dims, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?ShowDiagonal = ShowDiagonal, - ?Diagonal = Diagonal, - ?ShowLowerHalf = ShowLowerHalf, - ?ShowUpperHalf = ShowUpperHalf, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a scatter plot matrix (SPLOM) from multiple encoded input dimensions. - /// - /// Each splom dimension is provided as a pair of a dimension label and an encoded typed array containing that dimension's values. - /// Splom traces support all `scattergl` marker style attributes. Specify `layout.grid` attributes and/or layout x-axis and y-axis attributes for more control over the axis positioning and style. - /// - /// Sets the dimensions of the scatter plot matrix as (dimensionKey, encodedDimensionValues) pairs, where each such pair corresponds to a generated axis. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the Opacity otf the trace. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the marker. - /// Sets the colorscale of the marker. Use `Color.fromColorScaleValues` to map marker colors to a colorscale. - /// Sets the outline of the marker - /// Sets the symbol of all marker - /// Sets the symbol of each individual marker - /// Sets the markers (use this for more finegrained control than the other marker-associated arguments). - /// Whether or not to show the matrix diagional - /// Sets the styles applied to the scatter plot matrix diagonal - /// Determines whether or not subplots on the lower half from the diagonal are displayed. - /// Determines whether or not subplots on the upper half from the diagonal are displayed. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Splom - ( - keyValuesEncoded: seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?ShowDiagonal: bool, - ?Diagonal: SplomDiagonal, - ?ShowLowerHalf: bool, - ?ShowUpperHalf: bool, - ?UseDefaults: bool - ) = - - let dims = - keyValuesEncoded - |> Seq.map (fun (key, encodedVals) -> Dimension.initSplom (Label = key, ValuesEncoded = encodedVals)) - - Chart.Splom( - dims, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?ShowDiagonal = ShowDiagonal, - ?Diagonal = Diagonal, - ?ShowLowerHalf = ShowLowerHalf, - ?ShowUpperHalf = ShowUpperHalf, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a point density plot - a combination of a Scatter plot and Histogram2DContour. - /// - /// Additionally to plotting the (x,y) data as points on a 2D plane, a density contour plot is computed by grouping a set of points specified by their x and y coordinates into bins, and applying a count aggregation function to compute the value to be used to compute contours. - /// The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case). The resulting distribution is visualized as a contour plot. - /// - /// - /// Sets the x coordinates of the plotted data as well as the sample data to be binned on the x axis. - /// Sets the y coordinates of the plotted data as well as the sample data to be binned on the y axis. - /// Sets the opacity of the point trace. - /// Sets the marker color of the point trace. - /// Sets the marker symbol of the point trace. - /// Sets the marker size of the point trace. - /// Sets the contour line dash style - /// Sets the contour line color - /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. - /// Sets the width of the contour lines - /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). - /// Wether or not to show the contour line - /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. - /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. - /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. - /// Determines whether to label the contour lines with their values. - /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. - /// Sets the starting contour level value. Must be less than `contours.end` - /// Sets the end contour level value. Must be more than `contours.start` - /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). - /// Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of `ncontours`. Has an effect only if `autocontour` is "true" or if `contours.size` is missing. - /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). - /// Sets the opacity of the histogram2dcontour trace. - /// Sets the color bar. - /// Sets the colorscale of the histogram2dcontour trace. - /// whether or not to show the colorbar - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member PointDensity - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - ?PointOpacity: float, - ?PointMarkerColor: Color, - ?PointMarkerSymbol: StyleParam.MarkerSymbol, - ?PointMarkerSize: int, - ?ContourLinesColor: Color, - ?ContourLinesDash: StyleParam.DrawingStyle, - ?ContourLinesSmoothing: float, - ?ContourLinesWidth: float, - ?ContourLines: Line, - ?ShowContourLines: bool, - ?ContoursColoring: StyleParam.ContourColoring, - ?ContoursOperation: StyleParam.ConstraintOperation, - ?ContoursType: StyleParam.ContourType, - ?ShowContoursLabels: bool, - ?ContoursLabelFont: Font, - ?ContoursStart: float, - ?ContoursEnd: float, - ?Contours: Contours, - ?NContours: int, - ?HistNorm: StyleParam.HistNorm, - ?ContourOpacity: float, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?UseDefaults: bool - ) = - - let showContourLines = - defaultArg ShowContourLines false - - let pointOpacity = - defaultArg PointOpacity 0.3 - - let contoursColoring = - defaultArg ContoursColoring StyleParam.ContourColoring.Fill - - let useDefaults = - defaultArg UseDefaults true - - let contourLinesWidth = - ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. - - let marker = - Marker.init (?Color = PointMarkerColor, ?Symbol = PointMarkerSymbol, ?Size = PointMarkerSize) - - let pointTrace = - Trace2D.initScatter ( - Trace2DStyle.Scatter( - X = x, - Y = y, - Mode = StyleParam.Mode.Markers, - Marker = marker, - Opacity = pointOpacity - ) - ) - - let contourLines = - ContourLines - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - Width = contourLinesWidth, - ?Color = ContourLinesColor, - ?Dash = ContourLinesDash, - ?Smoothing = ContourLinesSmoothing - ) - - let contours = - Contours - |> Option.defaultValue (TraceObjects.Contours.init ()) - |> TraceObjects.Contours.style ( - Coloring = contoursColoring, - ?Operation = ContoursOperation, - ?Start = ContoursStart, - ?End = ContoursEnd, - ?Type = ContoursType, - ?ShowLabels = ShowContoursLabels, - ?LabelFont = ContoursLabelFont - ) - - let densityContourTrace = - Trace2D.initHistogram2DContour ( - Trace2DStyle.Histogram2DContour( - X = x, - Y = y, - Contours = contours, - Line = contourLines, - ?NContours = NContours, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?HistNorm = HistNorm, - ?Opacity = ContourOpacity - ) - ) - - [ - densityContourTrace :> Trace - pointTrace :> Trace - ] - |> GenericChart.ofTraceObjects useDefaults - - /// Creates a point density plot from encoded x and y coordinates. - [] - static member PointDensity - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - ?PointOpacity: float, - ?PointMarkerColor: Color, - ?PointMarkerSymbol: StyleParam.MarkerSymbol, - ?PointMarkerSize: int, - ?ContourLinesColor: Color, - ?ContourLinesDash: StyleParam.DrawingStyle, - ?ContourLinesSmoothing: float, - ?ContourLinesWidth: float, - ?ContourLines: Line, - ?ShowContourLines: bool, - ?ContoursColoring: StyleParam.ContourColoring, - ?ContoursOperation: StyleParam.ConstraintOperation, - ?ContoursType: StyleParam.ContourType, - ?ShowContoursLabels: bool, - ?ContoursLabelFont: Font, - ?ContoursStart: float, - ?ContoursEnd: float, - ?Contours: Contours, - ?NContours: int, - ?HistNorm: StyleParam.HistNorm, - ?ContourOpacity: float, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?UseDefaults: bool - ) = - - let showContourLines = - defaultArg ShowContourLines false - - let pointOpacity = - defaultArg PointOpacity 0.3 - - let contoursColoring = - defaultArg ContoursColoring StyleParam.ContourColoring.Fill - - let useDefaults = - defaultArg UseDefaults true - - let contourLinesWidth = - ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. - - let marker = - Marker.init (?Color = PointMarkerColor, ?Symbol = PointMarkerSymbol, ?Size = PointMarkerSize) - - let pointTrace = - Trace2D.initScatter ( - Trace2DStyle.Scatter( - XEncoded = xEncoded, - YEncoded = yEncoded, - Mode = StyleParam.Mode.Markers, - Marker = marker, - Opacity = pointOpacity - ) - ) - - let contourLines = - ContourLines - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - Width = contourLinesWidth, - ?Color = ContourLinesColor, - ?Dash = ContourLinesDash, - ?Smoothing = ContourLinesSmoothing - ) - - let contours = - Contours - |> Option.defaultValue (TraceObjects.Contours.init ()) - |> TraceObjects.Contours.style ( - Coloring = contoursColoring, - ?Operation = ContoursOperation, - ?Start = ContoursStart, - ?End = ContoursEnd, - ?Type = ContoursType, - ?ShowLabels = ShowContoursLabels, - ?LabelFont = ContoursLabelFont - ) - - let densityContourTrace = - Trace2D.initHistogram2DContour ( - Trace2DStyle.Histogram2DContour( - XEncoded = xEncoded, - YEncoded = yEncoded, - Contours = contours, - Line = contourLines, - ?NContours = NContours, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?HistNorm = HistNorm, - ?Opacity = ContourOpacity - ) - ) - - [ - densityContourTrace :> Trace - pointTrace :> Trace - ] - |> GenericChart.ofTraceObjects useDefaults - - /// Creates a Pareto chart. - /// Sets the (key,value) pairs that are plotted as the size and key of each bar. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the y axis label. - /// Determines whether or not grid lines are drawn. If "true", the grid lines are drawn for the pareto distribution figure; defaults to true. - [] - static member Pareto - ( - keysValues: seq<#IConvertible * float> - , ?Name: string - , ?Label: string - , ?ShowGrid: bool - ) = - let orderedLabels, orderedValues = - keysValues - |> Seq.sortByDescending snd - |> Seq.unzip - - let sum = orderedValues |> Seq.sum - let topPaddingRatio = 0.05 - let cumulativeSum = - Seq.scan (+) 0. orderedValues - |> Seq.skip 1 - - let paretoValues = - Seq.zip orderedLabels cumulativeSum - |> Seq.map (fun (label,value) -> label, value / sum * 100.) - - let bars = Chart.Column(Seq.zip orderedLabels orderedValues,?Name=Name) - - let lines = - Chart.Line( - paretoValues - , Name = "Cumulative %" - , ShowLegend = true - , ShowMarkers = true - , Marker = Marker.init(Size = 8, Symbol = StyleParam.MarkerSymbol.Cross, Angle = 45.) - ) - |> Chart.withAxisAnchor (Y = 2) - - [bars;lines] - |> Chart.combine - |> Chart.withYAxisStyle ( - ?TitleText = Label - , Id = StyleParam.SubPlotId.YAxis 1 - , ShowGrid = false - , MinMax = (0.,sum * (1.+topPaddingRatio)) - ) - |> Chart.withYAxisStyle ( - TitleText = "%" - , Side = StyleParam.Side.Right - , Id = StyleParam.SubPlotId.YAxis 2 - , MinMax = (0.,100. * (1.+topPaddingRatio)) - , Overlaying = StyleParam.LinearAxisId.Y 1 - , ?ShowGrid = ShowGrid - ) - - /// Creates a Pareto chart. - /// Sets the labels that are matching the . - /// Sets the values that are plotted as the size of each bar. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the y axis label. - /// Determines whether or not grid lines are drawn. If "true", the grid lines are drawn for the pareto distribution figure; defaults to true. - static member Pareto - ( - labels: seq<#IConvertible> - , values: seq - , ?Name: string - , ?Label: string - , ?ShowGrid: bool - ) = - Chart.Pareto(Seq.zip labels values, ?Name=Name, ?Label=Label, ?ShowGrid=ShowGrid) - - /// Displays a residue Chart by displaying the y values in relation to the provided reference Values. - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data for the Y value. - /// Sets the y coordinates for reference Y value. - /// Sets the trace name of the Y values. The trace name appear as the legend item and on hover - /// Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover - /// Sets the name of the legendgroup for the data distribution trace of this plot. - /// Sets the name of the legendgroup for the reference trace of this plot. - /// Determines whether or not an To show markers for each datum. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum for the Y values. - /// Sets individual text for each datum for the Y values. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker for the Y values. - /// Sets the colorscale of the marker for the Y values. - /// Sets the outline of the marker for the Y values. - /// Sets the marker symbol for each datum for the Y values. - /// Sets the marker symbol for each individual datum for the Y values. - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the Y values. - /// Sets the size of the datapoint markers for the Y values. - /// Sets the color of the line for the Y values. - /// Sets the colorscale of the line for the Y values. - /// Sets the width of the line for the Y values. - /// sets the drawing style of the line for the Y values. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the Y values. - /// Sets if the reference Line should be visible. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the reference Y values. - /// Sets the width of the line for the reference Y values. - /// Sets the color of the line for the reference Y values. - /// Sets a text associated with each datum for the reference Y values. - /// Sets individual text for each datum for the reference Y values. - /// Sets the position of text associated with each reference datum. - /// Sets the position of text associated with each individual reference datum - /// Sets the font used for `text` in Text. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Residual - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - reference: seq<#IConvertible>, - ?Name: string, - ?ReferenceName: string, - ?LegendGroupData: string, - ?LegendGroupReference: string, - ?ShowMarkers: bool, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?MarkerSize: int, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?ShowReference: bool, - ?ReferenceLine: Line, - ?ReferenceWidth: int, - ?ReferenceColor: Color, - ?ReferenceText: #IConvertible, - ?MultiReferenceText: seq<#IConvertible>, - ?ReferenceTextPosition: StyleParam.TextPosition, - ?MultiReferenceTextPosition: seq, - ?TextFont: Font, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let referenceName = defaultArg ReferenceName "Reference Line" - - // if text position or font is set than show labels (not only when hovering) - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || TextFont.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - let showReference = - let showBool = - match ShowReference with - | Some showRef -> showRef - | None -> true - if showBool then - StyleParam.Visible.True - else - StyleParam.Visible.False - - let markerSize = defaultArg MarkerSize 10 - - let (data,pointS) = - Seq.zip3 x y reference - |> Seq.collect(fun (x,y,refV) -> - [ - (x,refV),0 - (x,y),markerSize - (x,refV),0 - ] - ) - |> Array.ofSeq - |> Array.unzip - - let (x1,y1) = Array.unzip data - - let marker = - defaultArg - Marker - (TraceObjects.Marker.init( - MultiSize=pointS, - Opacity=1., - ?Color = MarkerColor, - ?Colorscale = MarkerColorScale, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol - )) - - let trace = - Chart.Scatter( - x = x1, - y = y1, - mode = changeMode StyleParam.Mode.Lines_Markers, - Opacity = 1., - Marker = marker, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line - ) - |> GenericChart.mapTrace ( - Trace2DStyle.Scatter( - ?LegendGroup = LegendGroupData - ) - ) - - let referenceLine = - Trace2D.initScatter( - Trace2DStyle.Scatter( - X = x, - Y = reference, - Mode = StyleParam.Mode.Lines, - ?Name = Some referenceName, - ?Visible = Some showReference, - ?ShowLegend = ShowLegend, - ?Text = ReferenceText, - ?MultiText = MultiReferenceText, - ?TextPosition = ReferenceTextPosition, - ?MultiTextPosition = MultiReferenceTextPosition, - ?Line = ReferenceLine, - ?LegendGroup = LegendGroupReference - ) - ) - |> TraceStyle.Marker( - Color = defaultArg ReferenceColor (Plotly.NET.Color.fromString "rgba(0, 0, 0, 1)"), - Size = defaultArg ReferenceWidth 10 - ) - - GenericChart.ofTraceObjects - useDefaults - [ - yield! (GenericChart.getTraces trace) - referenceLine - ] - - - /// Displays a residue Chart by displaying the y values in relation to the provided reference Values. - /// Sets the x and y coordinates of the plotted data. - /// Sets the y coordinates for reference Y value. - /// Sets the trace name of the Y values. The trace name appear as the legend item and on hover - /// Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover - /// Sets the name of the legendgroup for the data distribution trace of this plot. - /// Sets the name of the legendgroup for the reference trace of this plot. - /// Determines whether or not an To show markers for each datum. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum for the Y values. - /// Sets individual text for each datum for the Y values. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker for the Y values. - /// Sets the colorscale of the marker for the Y values. - /// Sets the outline of the marker for the Y values. - /// Sets the marker symbol for each datum for the Y values. - /// Sets the marker symbol for each individual datum for the Y values. - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the Y values. - /// Sets the size of the datapoint markers for the Y values. - /// Sets the color of the line for the Y values. - /// Sets the colorscale of the line for the Y values. - /// Sets the width of the line for the Y values. - /// sets the drawing style of the line for the Y values. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the Y values. - /// Sets if the reference Line should be visible. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the reference Y values. - /// Sets the width of the line for the reference Y values. - /// Sets the color of the line for the reference Y values. - /// Sets a text associated with each datum for the reference Y values. - /// Sets individual text for each datum for the reference Y values. - /// Sets the position of text associated with each reference datum. - /// Sets the position of text associated with each individual reference datum - /// Sets the font used for `text` in Text. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Residual - ( - xy: seq<#IConvertible*#IConvertible>, - reference: seq<#IConvertible>, - ?Name: string, - ?ReferenceName: string, - ?LegendGroupData: string, - ?LegendGroupReference: string, - ?ShowMarkers: bool, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?MarkerSize: int, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?ShowReference: bool, - ?ReferenceLine: Line, - ?ReferenceWidth: int, - ?ReferenceColor: Color, - ?ReferenceText: #IConvertible, - ?MultiReferenceText: seq<#IConvertible>, - ?ReferenceTextPosition: StyleParam.TextPosition, - ?MultiReferenceTextPosition: seq, - ?TextFont: Font, - ?UseDefaults: bool - ) = - - let (x,y) = Seq.unzip xy - Chart.Residual - ( - x = x, - y = y, - reference = reference, - ?Name = Name, - ?ReferenceName = ReferenceName, - ?LegendGroupData = LegendGroupData, - ?LegendGroupReference = LegendGroupReference, - ?ShowMarkers = ShowMarkers, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?MarkerSize = MarkerSize, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?ShowReference = ShowReference, - ?ReferenceLine = ReferenceLine, - ?ReferenceWidth = ReferenceWidth, - ?ReferenceColor = ReferenceColor, - ?ReferenceText = ReferenceText, - ?MultiReferenceText = MultiReferenceText, - ?ReferenceTextPosition = ReferenceTextPosition, - ?MultiReferenceTextPosition = MultiReferenceTextPosition, - ?TextFont = TextFont, - ?UseDefaults = UseDefaults - ) - - - /// Displays a residue Chart by displaying the y values in relation to the provided reference Values. - /// Sets the x and y coordinates of the plotted data. - /// Sets the y coordinate for reference Y value. - /// Sets the trace name of the Y values. The trace name appear as the legend item and on hover - /// Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover - /// Sets the name of the legendgroup for the data distribution trace of this plot. - /// Sets the name of the legendgroup for the reference trace of this plot. - /// Determines whether or not an To show markers for each datum. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum for the Y values. - /// Sets individual text for each datum for the Y values. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker for the Y values. - /// Sets the colorscale of the marker for the Y values. - /// Sets the outline of the marker for the Y values. - /// Sets the marker symbol for each datum for the Y values. - /// Sets the marker symbol for each individual datum for the Y values. - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the Y values. - /// Sets the size of the datapoint markers for the Y values. - /// Sets the color of the line for the Y values. - /// Sets the colorscale of the line for the Y values. - /// Sets the width of the line for the Y values. - /// sets the drawing style of the line for the Y values. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the Y values. - /// Sets if the reference Line should be visible. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the reference Y values. - /// Sets the width of the line for the reference Y values. - /// Sets the color of the line for the reference Y values. - /// Sets a text associated with each datum for the reference Y values. - /// Sets individual text for each datum for the reference Y values. - /// Sets the position of text associated with each reference datum. - /// Sets the position of text associated with each individual reference datum - /// Sets the font used for `text` in Text. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Residual - ( - xy: seq<#IConvertible*#IConvertible>, - referenceValue: #IConvertible, - ?Name: string, - ?ReferenceName: string, - ?LegendGroupData :string, - ?LegendGroupReference :string, - ?ShowMarkers: bool, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?MarkerSize: int, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?ShowReference: bool, - ?ReferenceLine: Line, - ?ReferenceWidth: int, - ?ReferenceColor: Color, - ?ReferenceText: #IConvertible, - ?MultiReferenceText: seq<#IConvertible>, - ?ReferenceTextPosition: StyleParam.TextPosition, - ?MultiReferenceTextPosition: seq, - ?TextFont: Font, - ?UseDefaults: bool - ) = - - let (x,y) = Seq.unzip xy - let reference = Seq.map(fun x -> referenceValue) x - Chart.Residual - ( - x = x, - y = y, - reference = reference, - ?Name = Name, - ?ReferenceName = ReferenceName, - ?LegendGroupData = LegendGroupData, - ?LegendGroupReference = LegendGroupReference, - ?ShowMarkers = ShowMarkers, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?MarkerSize = MarkerSize, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?ShowReference = ShowReference, - ?ReferenceLine = ReferenceLine, - ?ReferenceWidth = ReferenceWidth, - ?ReferenceColor = ReferenceColor, - ?ReferenceText = ReferenceText, - ?MultiReferenceText = MultiReferenceText, - ?ReferenceTextPosition = ReferenceTextPosition, - ?MultiReferenceTextPosition = MultiReferenceTextPosition, - ?TextFont = TextFont, - ?UseDefaults = UseDefaults - ) - - - /// - /// Displays a residue Chart by displaying the y values in relation to the provided reference Values. - /// - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Sets the y coordinate for reference Y value. - /// Sets the trace name of the Y values. The trace name appear as the legend item and on hover - /// Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover - /// Sets the name of the legendgroup for the data distribution trace of this plot. - /// Sets the name of the legendgroup for the reference trace of this plot. - /// Determines whether or not an To show markers for each datum. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets a text associated with each datum for the Y values. - /// Sets individual text for each datum for the Y values. - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker for the Y values. - /// Sets the colorscale of the marker for the Y values. - /// Sets the outline of the marker for the Y values. - /// Sets the marker symbol for each datum for the Y values. - /// Sets the marker symbol for each individual datum for the Y values. - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the Y values. - /// Sets the size of the datapoint markers for the Y values. - /// Sets the color of the line for the Y values. - /// Sets the colorscale of the line for the Y values. - /// Sets the width of the line for the Y values. - /// sets the drawing style of the line for the Y values. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the Y values. - /// Sets if the reference Line should be visible. - /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the reference Y values. - /// Sets the width of the line for the reference Y values. - /// Sets the color of the line for the reference Y values. - /// Sets a text associated with each datum for the reference Y values. - /// Sets individual text for each datum for the reference Y values. - /// Sets the position of text associated with each reference datum. - /// Sets the position of text associated with each individual reference datum - /// Sets the font used for `text` in Text. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Residual - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - referenceValue: #IConvertible, - ?Name: string, - ?ReferenceName: string, - ?LegendGroupData: string, - ?LegendGroupReference: string, - ?ShowMarkers: bool, - ?ShowLegend: bool, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?MarkerSize: int, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?ShowReference: bool, - ?ReferenceLine: Line, - ?ReferenceWidth: int, - ?ReferenceColor: Color, - ?ReferenceText: #IConvertible, - ?MultiReferenceText: seq<#IConvertible>, - ?ReferenceTextPosition: StyleParam.TextPosition, - ?MultiReferenceTextPosition: seq, - ?TextFont: Font, - ?UseDefaults: bool - ) = - - let reference = Seq.map(fun x -> referenceValue) x - Chart.Residual - ( - x = x, - y = y, - reference = reference, - ?Name = Name, - ?ReferenceName = ReferenceName, - ?LegendGroupData = LegendGroupData, - ?LegendGroupReference = LegendGroupReference, - ?ShowMarkers = ShowMarkers, - ?ShowLegend = ShowLegend, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?MarkerSize = MarkerSize, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?ShowReference = ShowReference, - ?ReferenceLine = ReferenceLine, - ?ReferenceWidth = ReferenceWidth, - ?ReferenceColor = ReferenceColor, - ?ReferenceText = ReferenceText, - ?MultiReferenceText = MultiReferenceText, - ?ReferenceTextPosition = ReferenceTextPosition, - ?MultiReferenceTextPosition = MultiReferenceTextPosition, - ?TextFont = TextFont, - ?UseDefaults = UseDefaults - ) diff --git a/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Area.fs b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Area.fs new file mode 100644 index 00000000..64d5e772 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Area.fs @@ -0,0 +1,979 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +open System.Runtime.CompilerServices + +open System.Runtime.InteropServices + +[] +module Chart2D_Area = + [] + type Chart = + /// Creates an Area chart, which uses a Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Whether to show markers for the individual data points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets a pattern shape for the area fill + /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Area + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?FillColor: Color, + ?FillPatternShape: StyleParam.PatternShape, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let fillpattern = + FillPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = FillPatternShape) + + Chart.Line( + x = x, + y = y, + Fill = StyleParam.Fill.ToZero_y, + ?ShowMarkers = ShowMarkers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + FillPattern = fillpattern, + ?FillColor = FillColor, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + /// Creates an Area chart from encoded x and y coordinates. + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Whether to show markers for the individual data points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets a pattern shape for the area fill + /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Area + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?FillColor: Color, + ?FillPatternShape: StyleParam.PatternShape, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let fillpattern = + FillPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = FillPatternShape) + + Chart.Line( + xEncoded = xEncoded, + yEncoded = yEncoded, + Fill = StyleParam.Fill.ToZero_y, + ?ShowMarkers = ShowMarkers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + FillPattern = fillpattern, + ?FillColor = FillColor, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + + + /// Creates an Area chart, which uses a Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. + /// Sets the x and y coordinates of the plotted data. + /// Whether to show markers for the individual data points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets a pattern shape for the area fill + /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Area + ( + xy: seq<#IConvertible * #IConvertible>, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?FillColor: Color, + ?FillPatternShape: StyleParam.PatternShape, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let x, y = Seq.unzip xy + + Chart.Area( + x = x, + y = y, + ?ShowMarkers = ShowMarkers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?FillColor = FillColor, + ?FillPatternShape = FillPatternShape, + ?FillPattern = FillPattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + + /// Creates a Spline area chart, which uses a smoothed Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Whether to show markers for the individual data points + /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets a pattern shape for the area fill + /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member SplineArea + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?ShowMarkers: bool, + ?Smoothing: float, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?FillColor: Color, + ?FillPatternShape: StyleParam.PatternShape, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let fillpattern = + FillPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = FillPatternShape) + + Chart.Spline( + x = x, + y = y, + Fill = StyleParam.Fill.ToZero_y, + ?ShowMarkers = ShowMarkers, + ?Smoothing = Smoothing, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?FillColor = FillColor, + FillPattern = fillpattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + + ) + + /// Creates a Spline area chart from encoded x and y coordinates. + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Whether to show markers for the individual data points + /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets a pattern shape for the area fill + /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member SplineArea + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?ShowMarkers: bool, + ?Smoothing: float, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?FillColor: Color, + ?FillPatternShape: StyleParam.PatternShape, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let fillpattern = + FillPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = FillPatternShape) + + Chart.Spline( + xEncoded = xEncoded, + yEncoded = yEncoded, + Fill = StyleParam.Fill.ToZero_y, + ?ShowMarkers = ShowMarkers, + ?Smoothing = Smoothing, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?FillColor = FillColor, + FillPattern = fillpattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + + ) + + /// Creates a Spline area chart, which uses a smoothed Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. + /// Sets the x and y coordinates of the plotted data. + /// Whether to show markers for the individual data points + /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets a pattern shape for the area fill + /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + static member SplineArea + ( + xy: seq<#IConvertible * #IConvertible>, + ?ShowMarkers: bool, + ?Smoothing: float, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?FillColor: Color, + ?FillPatternShape: StyleParam.PatternShape, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let x, y = Seq.unzip xy + + Chart.SplineArea( + x = x, + y = y, + ?ShowMarkers = ShowMarkers, + ?Smoothing = Smoothing, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?FillColor = FillColor, + ?FillPatternShape = FillPatternShape, + ?FillPattern = FillPattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + /// Creates a stacked Area chart, which uses a Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. Multiple Charts of this type are stacked on top of each others y dimensions + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Whether to show markers for the individual data points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets a pattern shape for the area fill + /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member StackedArea + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?FillColor: Color, + ?FillPatternShape: StyleParam.PatternShape, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let fillpattern = + FillPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = FillPatternShape) + + Chart.Line( + x = x, + y = y, + Fill = StyleParam.Fill.ToNext_y, + ?ShowMarkers = ShowMarkers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + StackGroup = "stackedarea", + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?FillColor = FillColor, + FillPattern = fillpattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + /// Creates a stacked Area chart from encoded x and y coordinates. + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Whether to show markers for the individual data points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets a pattern shape for the area fill + /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member StackedArea + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?FillColor: Color, + ?FillPatternShape: StyleParam.PatternShape, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let fillpattern = + FillPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = FillPatternShape) + + Chart.Line( + xEncoded = xEncoded, + yEncoded = yEncoded, + Fill = StyleParam.Fill.ToNext_y, + ?ShowMarkers = ShowMarkers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + StackGroup = "stackedarea", + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?FillColor = FillColor, + FillPattern = fillpattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + /// Creates a stacked Area chart, which uses a Line plotted between the given datums in a 2D space, additionally colouring the area between the line and the Y Axis. Multiple Charts of this type are stacked on top of each others y dimensions + /// Sets the x and y coordinates of the plotted data. + /// Whether to show markers for the individual data points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// ets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets a pattern shape for the area fill + /// Sets the pattern within the area. (use this for more finegrained control than the other fillpattern-associated arguments). + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member StackedArea + ( + xy: seq<#IConvertible * #IConvertible>, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?FillColor: Color, + ?FillPatternShape: StyleParam.PatternShape, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let x, y = Seq.unzip xy + + Chart.StackedArea( + x = x, + y = y, + ?ShowMarkers = ShowMarkers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?FillPatternShape = FillPatternShape, + ?FillPattern = FillPattern, + ?FillColor = FillColor, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + diff --git a/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Bar.fs b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Bar.fs new file mode 100644 index 00000000..196a16f0 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Bar.fs @@ -0,0 +1,921 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +open System.Runtime.CompilerServices + +open System.Runtime.InteropServices + +[] +module Chart2D_Bar = + [] + type Chart = + [] + static member Bar + ( + values: seq<#IConvertible>, + ?Keys: seq<#IConvertible>, + ?MultiKeys: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidth: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + Pattern = pattern, + ?MultiOpacity = MultiOpacity, + ?Colorscale = MarkerColorScale, + ?Outline = MarkerOutline + ) + + + Trace2D.initBar ( + Trace2DStyle.Bar( + X = values, + ?Y = Keys, + ?MultiY = MultiKeys, + Orientation = StyleParam.Orientation.Horizontal, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + Marker = marker + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a bar chart with encoded values, plotted horizontally. + /// + /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. + /// + /// Sets the values that are plotted as the size of each bar as an encoded typed array. + /// Sets the keys associated with each bar as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the Opacity of each individual bar. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. + /// Sets the color of the bar outlines + /// Sets a pattern shape for all bars + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width for each bar as an encoded typed array. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Bar + ( + valuesEncoded: EncodedTypedArray, + ?KeysEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidthEncoded: EncodedTypedArray, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + Pattern = pattern, + ?MultiOpacity = MultiOpacity, + ?Colorscale = MarkerColorScale, + ?Outline = MarkerOutline + ) + + + Trace2D.initBar ( + Trace2DStyle.Bar( + XEncoded = valuesEncoded, + ?YEncoded = KeysEncoded, + Orientation = StyleParam.Orientation.Horizontal, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Base = Base, + ?Width = Width, + ?MultiWidthEncoded = MultiWidthEncoded, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + Marker = marker + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a bar chart, with bars plotted horizontally + /// + /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. + /// + /// Sets the (key,value) pairs that are plotted as the size and key of each bar. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the Opacity of each individual bar. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. + /// Sets the color of the bar outlines + /// Sets a pattern shape for all bars + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width (in position axis units) for each bar. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Bar + ( + keysValues: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidth: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + let keys, values = Seq.unzip keysValues + + Chart.Bar( + values = values, + Keys = keys, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?UseDefaults = UseDefaults + ) + + + /// + /// Creates a stacked bar chart, with bars plotted horizontally. Values with the same key are stacked on top of each other in the X dimension. + /// To create this type of chart, combine multiple of these charts via `Chart.combine`. + /// + /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. + /// + /// Sets the values that are plotted as the size of each bar. + /// Sets the keys associated with each bar. + /// Sets the keys associated with each bar. Use two inner arrays here to plot multicategorial data + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the Opacity of each individual bar. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. + /// Sets the color of the bar outlines + /// Sets a pattern shape for all bars + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width (in position axis units) for each bar. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member StackedBar + ( + values: seq<#IConvertible>, + ?Keys: seq<#IConvertible>, + ?MultiKeys: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidth: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + Chart.Bar( + values = values, + ?Keys = Keys, + ?MultiKeys = MultiKeys, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?UseDefaults = UseDefaults + ) + |> GenericChart.mapLayout (Layout.style (BarMode = StyleParam.BarMode.Stack)) + + /// + /// Creates a stacked bar chart from encoded values, with bars plotted horizontally. + /// + [] + static member StackedBar + ( + valuesEncoded: EncodedTypedArray, + ?KeysEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidthEncoded: EncodedTypedArray, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + Chart.Bar( + valuesEncoded = valuesEncoded, + ?KeysEncoded = KeysEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?Base = Base, + ?Width = Width, + ?MultiWidthEncoded = MultiWidthEncoded, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?UseDefaults = UseDefaults + ) + |> GenericChart.mapLayout (Layout.style (BarMode = StyleParam.BarMode.Stack)) + + + /// + /// Creates a stacked bar chart, with bars plotted horizontally. Values with the same key are stacked on top of each other in the X dimension. + /// To create this type of chart, combine multiple of these charts via `Chart.combine`. + /// + /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. + /// + /// Sets the (key,value) pairs that are plotted as the size and key of each bar. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the Opacity of each individual bar. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. + /// Sets the color of the bar outlines + /// Sets a pattern shape for all bars + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width (in position axis units) for each bar. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member StackedBar + ( + keysValues: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidth: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + let keys, values = Seq.unzip keysValues + + Chart.StackedBar( + values = values, + Keys = keys, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a column chart, with bars plotted vertically + /// + /// A column chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. + /// + /// Sets the values that are plotted as the size of each bar. + /// Sets the keys associated with each bar. + /// Sets the keys associated with each bar. Use two inner arrays here to plot multicategorial data + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the Opacity of each individual bar. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. + /// Sets the color of the bar outlines + /// Sets a pattern shape for all bars + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width (in position axis units) for each bar. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Column + ( + values: seq<#IConvertible>, + ?Keys: seq<#IConvertible>, + ?MultiKeys: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidth: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + Pattern = pattern, + ?MultiOpacity = MultiOpacity, + ?Colorscale = MarkerColorScale, + ?Outline = MarkerOutline + ) + + + Trace2D.initBar ( + Trace2DStyle.Bar( + Y = values, + ?X = Keys, + ?MultiX = MultiKeys, + Orientation = StyleParam.Orientation.Vertical, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + Marker = marker + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a column chart from encoded values, with bars plotted vertically. + /// + [] + static member Column + ( + valuesEncoded: EncodedTypedArray, + ?KeysEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidthEncoded: EncodedTypedArray, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + Pattern = pattern, + ?MultiOpacity = MultiOpacity, + ?Colorscale = MarkerColorScale, + ?Outline = MarkerOutline + ) + + + Trace2D.initBar ( + Trace2DStyle.Bar( + YEncoded = valuesEncoded, + ?XEncoded = KeysEncoded, + Orientation = StyleParam.Orientation.Vertical, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Base = Base, + ?Width = Width, + ?MultiWidthEncoded = MultiWidthEncoded, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + Marker = marker + ) + ) + |> GenericChart.ofTraceObject useDefaults + + + /// + /// Creates a column chart, with bars plotted vertically + /// + /// A column chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. + /// + /// Sets the (key,value) pairs that are plotted as the size and key of each bar. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the Opacity of each individual bar. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. + /// Sets the color of the bar outlines + /// Sets a pattern shape for all bars + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width (in position axis units) for each bar. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Column + ( + keysValues: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidth: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + let keys, values = Seq.unzip keysValues + + Chart.Column( + values = values, + Keys = keys, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?UseDefaults = UseDefaults + ) + + + /// + /// Creates a stacked column chart, with bars plotted vertically. Values with the same key are stacked on top of each other in the Y dimension. + /// To create this type of chart, combine multiple of these charts via `Chart.combine`. + /// + /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. + /// + /// Sets the values that are plotted as the size of each bar. + /// Sets the keys associated with each bar. + /// Sets the keys associated with each bar. Use two inner arrays here to plot multicategorial data + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the Opacity of each individual bar. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. + /// Sets the color of the bar outlines + /// Sets a pattern shape for all bars + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width (in position axis units) for each bar. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member StackedColumn + ( + values: seq<#IConvertible>, + ?Keys: seq<#IConvertible>, + ?MultiKeys: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidth: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + Chart.Column( + values = values, + ?Keys = Keys, + ?MultiKeys = MultiKeys, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?UseDefaults = UseDefaults + ) + |> GenericChart.mapLayout (Layout.style (BarMode = StyleParam.BarMode.Stack)) + + /// + /// Creates a stacked column chart from encoded values, with bars plotted vertically. + /// + [] + static member StackedColumn + ( + valuesEncoded: EncodedTypedArray, + ?KeysEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidthEncoded: EncodedTypedArray, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + Chart.Column( + valuesEncoded = valuesEncoded, + ?KeysEncoded = KeysEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?Base = Base, + ?Width = Width, + ?MultiWidthEncoded = MultiWidthEncoded, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?UseDefaults = UseDefaults + ) + |> GenericChart.mapLayout (Layout.style (BarMode = StyleParam.BarMode.Stack)) + + + /// + /// Creates a stacked column chart, with bars plotted vertically. Values with the same key are stacked on top of each other in the Y dimension. + /// To create this type of chart, combine multiple of these charts via `Chart.combine`. + /// + /// A bar chart is a chart that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. + /// + /// Sets the (key,value) pairs that are plotted as the size and key of each bar. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the Opacity of each individual bar. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. + /// Sets the color of the bar outlines + /// Sets a pattern shape for all bars + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width (in position axis units) for each bar. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member StackedColumn + ( + keysValues: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidth: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?UseDefaults: bool + ) = + + let keys, values = Seq.unzip keysValues + + Chart.StackedColumn( + values = values, + Keys = keys, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?UseDefaults = UseDefaults + ) + diff --git a/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Distribution.fs b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Distribution.fs new file mode 100644 index 00000000..7aee0780 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Distribution.fs @@ -0,0 +1,866 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +open System.Runtime.CompilerServices + +open System.Runtime.InteropServices + +[] +module Chart2D_Distribution = + [] + type Chart = + /// + /// Visualizes the distribution of the input data as a box plot. + /// + /// A box plot is a method for graphically demonstrating the locality, spread and skewness groups of numerical data through their quartiles. + /// The default style is based on the five number summary: minimum, first quartile, median, third quartile, and maximum. + /// + /// The sample data from which statistics are computed is set in `x` for vertically spanning boxes and in `y` for horizontally spanning boxes. + /// + /// Sets the x sample data or coordinates + /// Sets the x sample data or coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the y sample data or coordinates + /// Sets the y sample data or coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the marker color. + /// Sets the marker for the box (use this for more finegrained control than the other marker-associated arguments).// Sets the opacity of this trace. + /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). + /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the box(es) are shown with no sample points Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set. Defaults to "all" under the q1/median/q3 signature. Otherwise defaults to "outliers". + /// If "true", the mean of the box(es)' underlying distribution is drawn as a dashed line inside the box(es). If "sd" the standard deviation is also drawn. Defaults to "true" when `mean` is set. Defaults to "sd" when `sd` is set Otherwise defaults to "false". + /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). + /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes + /// Sets the orientation of the box(es). If "v" ("h"), the distribution is visualized along the vertical (horizontal). + /// Sets the color of the box outline + /// Sets the width of the box outline + /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). + /// 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. + /// 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. + /// Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 " IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes' notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info. Defaults to "false" unless `notchwidth` or `notchspan` is set. + /// Sets the width of the notches relative to the box' width. For example, with 0, the notches are as wide as the box(es). + /// Sets the method used to compute the sample's Q1 and Q3 quartiles. The "linear" method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://www.amstat.org/publications/jse/v14n3/langford.html). The "exclusive" method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The "inclusive" method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half. + /// Sets the upper and lower bound for the boxes quartiles means box is drawn between Q1 and Q3 SD means the box is drawn between Mean +- Standard Deviation Argument sdmultiple (default 1) to scale the box size So it could be drawn 1-stddev, 3-stddev etc + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member BoxPlot + ( + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?Y: seq<#IConvertible>, + ?MultiY: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?FillColor: Color, + ?MarkerColor: Color, + ?Marker: Marker, + ?Opacity: float, + ?WhiskerWidth: float, + ?BoxPoints: StyleParam.BoxPoints, + ?BoxMean: StyleParam.BoxMean, + ?Jitter: float, + ?PointPos: float, + ?Orientation: StyleParam.Orientation, + ?OutlineColor: Color, + ?OutlineWidth: float, + ?Outline: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?Notched: bool, + ?NotchWidth: float, + ?QuartileMethod: StyleParam.QuartileMethod, + ?SizeMode: StyleParam.BoxSizeMode, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let outline = + Outline + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style (?Color = OutlineColor, ?Width = OutlineWidth) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style (?Color = MarkerColor) + + + Trace2D.initBoxPlot ( + Trace2DStyle.BoxPlot( + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?X = X, + ?MultiX = MultiX, + ?Y = Y, + ?MultiY = MultiY, + ?Text = Text, + ?MultiText = MultiText, + ?WhiskerWidth = WhiskerWidth, + ?BoxPoints = BoxPoints, + ?BoxMean = BoxMean, + ?Jitter = Jitter, + ?PointPos = PointPos, + ?Orientation = Orientation, + ?FillColor = FillColor, + Marker = marker, + Line = outline, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?Notched = Notched, + ?NotchWidth = NotchWidth, + ?QuartileMethod = QuartileMethod, + ?SizeMode = SizeMode + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Visualizes the distribution of the input data as a box plot. + /// + /// A box plot is a method for graphically demonstrating the locality, spread and skewness groups of numerical data through their quartiles. + /// The default style is based on the five number summary: minimum, first quartile, median, third quartile, and maximum. + /// + /// The sample data from which statistics are computed is set in `x` for vertically spanning boxes and in `y` for horizontally spanning boxes. + /// + /// Sets the sample data or coordinates + /// Sets the orientation of the box. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the marker color. + /// Sets the marker for the box (use this for more finegrained control than the other marker-associated arguments).// Sets the opacity of this trace. + /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). + /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the box(es) are shown with no sample points Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set. Defaults to "all" under the q1/median/q3 signature. Otherwise defaults to "outliers". + /// If "true", the mean of the box(es)' underlying distribution is drawn as a dashed line inside the box(es). If "sd" the standard deviation is also drawn. Defaults to "true" when `mean` is set. Defaults to "sd" when `sd` is set Otherwise defaults to "false". + /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). + /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes + /// Sets the color of the box outline + /// Sets the width of the box outline + /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). + /// 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. + /// 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. + /// Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 " IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes' notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info. Defaults to "false" unless `notchwidth` or `notchspan` is set. + /// Sets the width of the notches relative to the box' width. For example, with 0, the notches are as wide as the box(es). + /// Sets the method used to compute the sample's Q1 and Q3 quartiles. The "linear" method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://www.amstat.org/publications/jse/v14n3/langford.html). The "exclusive" method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The "inclusive" method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half. + /// Sets the upper and lower bound for the boxes quartiles means box is drawn between Q1 and Q3 SD means the box is drawn between Mean +- Standard Deviation Argument sdmultiple (default 1) to scale the box size So it could be drawn 1-stddev, 3-stddev etc + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member BoxPlot + ( + data: seq<#IConvertible>, + orientation: StyleParam.Orientation, + ?Name: string, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?FillColor: Color, + ?MarkerColor: Color, + ?Marker: Marker, + ?Opacity: float, + ?WhiskerWidth: float, + ?BoxPoints: StyleParam.BoxPoints, + ?BoxMean: StyleParam.BoxMean, + ?Jitter: float, + ?PointPos: float, + ?OutlineColor: Color, + ?OutlineWidth: float, + ?Outline: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?Notched: bool, + ?NotchWidth: float, + ?QuartileMethod: StyleParam.QuartileMethod, + ?SizeMode: StyleParam.BoxSizeMode, + ?UseDefaults: bool + ) = + + let boxplot = + Chart.BoxPlot( + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?FillColor = FillColor, + ?MarkerColor = MarkerColor, + ?Marker = Marker, + ?Opacity = Opacity, + ?WhiskerWidth = WhiskerWidth, + ?BoxPoints = BoxPoints, + ?BoxMean = BoxMean, + ?Jitter = Jitter, + ?PointPos = PointPos, + ?OutlineColor = OutlineColor, + ?OutlineWidth = OutlineWidth, + ?Outline = Outline, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?Notched = Notched, + ?NotchWidth = NotchWidth, + ?QuartileMethod = QuartileMethod, + ?SizeMode = SizeMode, + ?UseDefaults = UseDefaults + ) + + match orientation with + | StyleParam.Orientation.Horizontal -> boxplot |> GenericChart.mapTrace (Trace2DStyle.BoxPlot(X = data)) + | StyleParam.Orientation.Vertical -> boxplot |> GenericChart.mapTrace (Trace2DStyle.BoxPlot(Y = data)) + + /// + /// Visualizes the distribution of the input data as a box plot using an encoded typed array. + /// + /// Sets the sample data or coordinates as an encoded typed array. + /// Sets the orientation of the box. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the fill color. + /// Sets the marker color. + /// Sets the marker for the box. + /// Sets the opacity of this trace. + /// Sets the width of the whiskers relative to the box' width. + /// Controls which sample points are shown. + /// Controls whether and how the mean is displayed. + /// Sets the amount of jitter in the sample points drawn. + /// Sets the position of the sample points in relation to the box(es). + /// Sets the color of the box outline + /// Sets the width of the box outline + /// Sets the box outline. + /// Set several traces linked to the same position axis or matching axes to the same alignmentgroup. + /// 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. + /// Determines whether or not notches are drawn. + /// Sets the width of the notches relative to the box' width. + /// Sets the method used to compute the sample's Q1 and Q3 quartiles. + /// Sets how box sizes are derived. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member BoxPlot + ( + dataEncoded: EncodedTypedArray, + orientation: StyleParam.Orientation, + ?Name: string, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?FillColor: Color, + ?MarkerColor: Color, + ?Marker: Marker, + ?Opacity: float, + ?WhiskerWidth: float, + ?BoxPoints: StyleParam.BoxPoints, + ?BoxMean: StyleParam.BoxMean, + ?Jitter: float, + ?PointPos: float, + ?OutlineColor: Color, + ?OutlineWidth: float, + ?Outline: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?Notched: bool, + ?NotchWidth: float, + ?QuartileMethod: StyleParam.QuartileMethod, + ?SizeMode: StyleParam.BoxSizeMode, + ?UseDefaults: bool + ) = + + let boxplot = + Chart.BoxPlot( + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?FillColor = FillColor, + ?MarkerColor = MarkerColor, + ?Marker = Marker, + ?Opacity = Opacity, + ?WhiskerWidth = WhiskerWidth, + ?BoxPoints = BoxPoints, + ?BoxMean = BoxMean, + ?Jitter = Jitter, + ?PointPos = PointPos, + ?OutlineColor = OutlineColor, + ?OutlineWidth = OutlineWidth, + ?Outline = Outline, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?Notched = Notched, + ?NotchWidth = NotchWidth, + ?QuartileMethod = QuartileMethod, + ?SizeMode = SizeMode, + ?UseDefaults = UseDefaults + ) + + match orientation with + | StyleParam.Orientation.Horizontal -> boxplot |> GenericChart.mapTrace (Trace2DStyle.BoxPlot(XEncoded = dataEncoded)) + | StyleParam.Orientation.Vertical -> boxplot |> GenericChart.mapTrace (Trace2DStyle.BoxPlot(YEncoded = dataEncoded)) + + + /// + /// Visualizes the distribution of the input data as a box plot. + /// + /// A box plot is a method for graphically demonstrating the locality, spread and skewness groups of numerical data through their quartiles. + /// The default style is based on the five number summary: minimum, first quartile, median, third quartile, and maximum. + /// + /// The sample data from which statistics are computed is set in `x` for vertically spanning boxes and in `y` for horizontally spanning boxes. + /// + /// Sets the xy sample data or coordinate pairs + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the marker color. + /// Sets the marker for the box (use this for more finegrained control than the other marker-associated arguments).// Sets the opacity of this trace. + /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). + /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the box(es) are shown with no sample points Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set. Defaults to "all" under the q1/median/q3 signature. Otherwise defaults to "outliers". + /// If "true", the mean of the box(es)' underlying distribution is drawn as a dashed line inside the box(es). If "sd" the standard deviation is also drawn. Defaults to "true" when `mean` is set. Defaults to "sd" when `sd` is set Otherwise defaults to "false". + /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). + /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes + /// Sets the orientation of the box(es). If "v" ("h"), the distribution is visualized along the vertical (horizontal). + /// Sets the color of the box outline + /// Sets the width of the box outline + /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). + /// 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. + /// 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. + /// Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 " IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes' notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info. Defaults to "false" unless `notchwidth` or `notchspan` is set. + /// Sets the width of the notches relative to the box' width. For example, with 0, the notches are as wide as the box(es). + /// Sets the method used to compute the sample's Q1 and Q3 quartiles. The "linear" method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://www.amstat.org/publications/jse/v14n3/langford.html). The "exclusive" method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The "inclusive" method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half. + /// Sets the upper and lower bound for the boxes quartiles means box is drawn between Q1 and Q3 SD means the box is drawn between Mean +- Standard Deviation Argument sdmultiple (default 1) to scale the box size So it could be drawn 1-stddev, 3-stddev etc + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member BoxPlot + ( + xy: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?FillColor: Color, + ?MarkerColor: Color, + ?Marker: Marker, + ?Opacity: float, + ?WhiskerWidth: float, + ?BoxPoints: StyleParam.BoxPoints, + ?BoxMean: StyleParam.BoxMean, + ?Jitter: float, + ?PointPos: float, + ?Orientation: StyleParam.Orientation, + ?OutlineColor: Color, + ?OutlineWidth: float, + ?Outline: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?Notched: bool, + ?NotchWidth: float, + ?QuartileMethod: StyleParam.QuartileMethod, + ?SizeMode: StyleParam.BoxSizeMode, + ?UseDefaults: bool + ) = + + let x, y = Seq.unzip xy + + Chart.BoxPlot( + X = x, + Y = y, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?FillColor = FillColor, + ?MarkerColor = MarkerColor, + ?Marker = Marker, + ?Opacity = Opacity, + ?WhiskerWidth = WhiskerWidth, + ?BoxPoints = BoxPoints, + ?BoxMean = BoxMean, + ?Jitter = Jitter, + ?PointPos = PointPos, + ?Orientation = Orientation, + ?OutlineColor = OutlineColor, + ?OutlineWidth = OutlineWidth, + ?Outline = Outline, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?Notched = Notched, + ?NotchWidth = NotchWidth, + ?QuartileMethod = QuartileMethod, + ?SizeMode = SizeMode, + ?UseDefaults = UseDefaults + ) + + + /// + /// Visualizes the distribution of the input data as a violin plot. + /// + /// A violin plot is a method of plotting numeric data. It is similar to a box plot, except that they also show the probability density of the data at different values, usually smoothed by a kernel density estimator. + /// + /// In vertical (horizontal) violin plots, statistics are computed using `y` (`x`) values. By supplying an `x` (`y`) array, one violin per distinct x (y) value is drawn If no `x` (`y`) array is provided, a single violin is drawn. That violin position is then positioned with with `name` or with `x0` (`y0`) if provided. + /// + /// Sets the x sample data or coordinates + /// Sets the x sample data or coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the y sample data or coordinates + /// Sets the y sample data or coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the Opacity otf the trace. + /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the violins are shown with no sample points. Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set, otherwise defaults to "outliers". + /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). + /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes + /// Sets the orientation of the violin(s). If "v" ("h"), the distribution is visualized along the vertical (horizontal). + /// Sets the width of the violin in data coordinates. If "0" (default value) the width is automatically selected based on the positions of other violin traces in the same subplot. + /// Sets the marker color. + /// Sets the marker for the violin (use this for more finegrained control than the other marker-associated arguments). + /// Sets the color of the box outline + /// Sets the width of the box outline + /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). + /// 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. + /// 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. + /// Whether and how to draw a miniature box plot + /// Sets the width of the miniature box plot + /// Sets the fill color of the miniature box plot + /// Sets the styles of the miniature box plot (use this for more finegrained control than the other box-associated arguments) + /// Sets the bandwidth used to compute the kernel density estimate. By default, the bandwidth is determined by Silverman's rule of thumb. + /// Whether and how to draw the meanline + /// If there are multiple violins that should be sized according to to some metric (see `scalemode`), link them by providing a non-empty group id here shared by every trace in the same group. If a violin's `width` is undefined, `scalegroup` will default to the trace's name. In this case, violins with the same names will be linked together + /// Sets the metric by which the width of each violin is determined."width" means each violin has the same (max) width"count" means the violins are scaled by the number of sample points makingup each violin. + /// Determines on which side of the position value the density function making up one half of a violin is plotted. Useful when comparing two violin traces under "overlay" mode, where one trace has `side` set to "positive" and the other to "negative". + /// Sets the span in data space for which the density function will be computed. Has an effect only when `spanmode` is set to "manual". + /// Sets the method by which the span in data space where the density function will be computed. "soft" means the span goes from the sample's minimum value minus two bandwidths to the sample's maximum value plus two bandwidths. "hard" means the span goes from the sample's minimum to its maximum value. For custom span settings, use mode "manual" and fill in the `span` attribute. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Violin + ( + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?Y: seq<#IConvertible>, + ?MultiY: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?FillColor: Color, + ?Opacity: float, + ?Points: StyleParam.JitterPoints, + ?Jitter: float, + ?PointPos: float, + ?Orientation: StyleParam.Orientation, + ?Width: float, + ?MarkerColor: Color, + ?Marker: Marker, + ?OutlineColor: Color, + ?OutlineWidth: float, + ?Outline: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?ShowBox: bool, + ?BoxWidth: float, + ?BoxFillColor: Color, + ?Box: Box, + ?BandWidth: float, + ?MeanLine: MeanLine, + ?ScaleGroup: string, + ?ScaleMode: StyleParam.ScaleMode, + ?Side: StyleParam.ViolinSide, + ?Span: StyleParam.Range, + ?SpanMode: StyleParam.SpanMode, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let box = + Box + |> Option.defaultValue (TraceObjects.Box.init ()) + |> TraceObjects.Box.style (?Visible = ShowBox, ?Width = BoxWidth, ?FillColor = BoxFillColor) + + let outline = + Outline + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style (?Color = OutlineColor, ?Width = OutlineWidth) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style (?Color = MarkerColor) + + Trace2D.initViolin ( + Trace2DStyle.Violin( + ?X = X, + ?MultiX = MultiX, + ?Y = Y, + ?MultiY = MultiY, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?FillColor = FillColor, + ?Points = Points, + ?Jitter = Jitter, + ?PointPos = PointPos, + ?Orientation = Orientation, + ?Width = Width, + Marker = marker, + Line = outline, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + Box = box, + ?BandWidth = BandWidth, + ?MeanLine = MeanLine, + ?ScaleGroup = ScaleGroup, + ?ScaleMode = ScaleMode, + ?Side = Side, + ?Span = Span, + ?SpanMode = SpanMode + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Visualizes the distribution of the input data as a violin plot. + /// + /// A violin plot is a method of plotting numeric data. It is similar to a box plot, except that they also show the probability density of the data at different values, usually smoothed by a kernel density estimator. + /// + /// In vertical (horizontal) violin plots, statistics are computed using `y` (`x`) values. By supplying an `x` (`y`) array, one violin per distinct x (y) value is drawn If no `x` (`y`) array is provided, a single violin is drawn. That violin position is then positioned with with `name` or with `x0` (`y0`) if provided. + /// + /// Sets the sample data or coordinate pairs + /// Sets the orientation of the violin(s). If "v" ("h"), the distribution is visualized along the vertical (horizontal). + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the Opacity otf the trace. + /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the violins are shown with no sample points. Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set, otherwise defaults to "outliers". + /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). + /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes + /// Sets the width of the violin in data coordinates. If "0" (default value) the width is automatically selected based on the positions of other violin traces in the same subplot. + /// Sets the marker color. + /// Sets the marker for the violin (use this for more finegrained control than the other marker-associated arguments). + /// Sets the color of the box outline + /// Sets the width of the box outline + /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). + /// 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. + /// 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. + /// Whether and how to draw a miniature box plot + /// Sets the width of the miniature box plot + /// Sets the fill color of the miniature box plot + /// Sets the styles of the miniature box plot (use this for more finegrained control than the other box-associated arguments) + /// Sets the bandwidth used to compute the kernel density estimate. By default, the bandwidth is determined by Silverman's rule of thumb. + /// Whether and how to draw the meanline + /// If there are multiple violins that should be sized according to to some metric (see `scalemode`), link them by providing a non-empty group id here shared by every trace in the same group. If a violin's `width` is undefined, `scalegroup` will default to the trace's name. In this case, violins with the same names will be linked together + /// Sets the metric by which the width of each violin is determined."width" means each violin has the same (max) width"count" means the violins are scaled by the number of sample points makingup each violin. + /// Determines on which side of the position value the density function making up one half of a violin is plotted. Useful when comparing two violin traces under "overlay" mode, where one trace has `side` set to "positive" and the other to "negative". + /// Sets the span in data space for which the density function will be computed. Has an effect only when `spanmode` is set to "manual". + /// Sets the method by which the span in data space where the density function will be computed. "soft" means the span goes from the sample's minimum value minus two bandwidths to the sample's maximum value plus two bandwidths. "hard" means the span goes from the sample's minimum to its maximum value. For custom span settings, use mode "manual" and fill in the `span` attribute. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Violin + ( + data: seq<#IConvertible>, + orientation: StyleParam.Orientation, + ?Name: string, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?FillColor: Color, + ?Opacity: float, + ?Points: StyleParam.JitterPoints, + ?Jitter: float, + ?PointPos: float, + ?Width: float, + ?MarkerColor: Color, + ?Marker: Marker, + ?OutlineColor: Color, + ?OutlineWidth: float, + ?Outline: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?ShowBox: bool, + ?BoxWidth: float, + ?BoxFillColor: Color, + ?Box: Box, + ?BandWidth: float, + ?MeanLine: MeanLine, + ?ScaleGroup: string, + ?ScaleMode: StyleParam.ScaleMode, + ?Side: StyleParam.ViolinSide, + ?Span: StyleParam.Range, + ?SpanMode: StyleParam.SpanMode, + ?UseDefaults: bool + ) = + + let violin = + Chart.Violin( + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?FillColor = FillColor, + ?Opacity = Opacity, + ?Points = Points, + ?Jitter = Jitter, + ?PointPos = PointPos, + ?Width = Width, + ?MarkerColor = MarkerColor, + ?Marker = Marker, + ?OutlineColor = OutlineColor, + ?OutlineWidth = OutlineWidth, + ?Outline = Outline, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?ShowBox = ShowBox, + ?BoxWidth = BoxWidth, + ?BoxFillColor = BoxFillColor, + ?Box = Box, + ?BandWidth = BandWidth, + ?MeanLine = MeanLine, + ?ScaleGroup = ScaleGroup, + ?ScaleMode = ScaleMode, + ?Side = Side, + ?Span = Span, + ?SpanMode = SpanMode, + ?UseDefaults = UseDefaults + ) + + match orientation with + | StyleParam.Orientation.Horizontal -> violin |> GenericChart.mapTrace (Trace2DStyle.Violin(X = data)) + | StyleParam.Orientation.Vertical -> violin |> GenericChart.mapTrace (Trace2DStyle.Violin(Y = data)) + + /// + /// Visualizes the distribution of the input data as a violin plot using an encoded typed array. + /// + /// Sets the sample data or coordinates as an encoded typed array. + /// Sets the orientation of the violin(s). + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the fill color. + /// Sets the Opacity of the trace. + /// Controls which sample points are shown. + /// Sets the amount of jitter in the sample points drawn. + /// Sets the position of the sample points in relation to the box(es). + /// Sets the width of the violin in data coordinates. + /// Sets the marker color. + /// Sets the marker for the violin. + /// Sets the color of the box outline + /// Sets the width of the box outline + /// Sets the box outline. + /// Set several traces linked to the same position axis or matching axes to the same alignmentgroup. + /// 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. + /// Whether and how to draw a miniature box plot + /// Sets the width of the miniature box plot + /// Sets the fill color of the miniature box plot + /// Sets the styles of the miniature box plot. + /// Sets the bandwidth used to compute the kernel density estimate. + /// Whether and how to draw the meanline + /// Links violins that should be sized according to the same metric. + /// Sets the metric by which the width of each violin is determined. + /// Determines on which side of the position value one half of a violin is plotted. + /// Sets the span in data space for which the density function will be computed. + /// Sets the method by which the span in data space is computed. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Violin + ( + dataEncoded: EncodedTypedArray, + orientation: StyleParam.Orientation, + ?Name: string, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?FillColor: Color, + ?Opacity: float, + ?Points: StyleParam.JitterPoints, + ?Jitter: float, + ?PointPos: float, + ?Width: float, + ?MarkerColor: Color, + ?Marker: Marker, + ?OutlineColor: Color, + ?OutlineWidth: float, + ?Outline: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?ShowBox: bool, + ?BoxWidth: float, + ?BoxFillColor: Color, + ?Box: Box, + ?BandWidth: float, + ?MeanLine: MeanLine, + ?ScaleGroup: string, + ?ScaleMode: StyleParam.ScaleMode, + ?Side: StyleParam.ViolinSide, + ?Span: StyleParam.Range, + ?SpanMode: StyleParam.SpanMode, + ?UseDefaults: bool + ) = + + let violin = + Chart.Violin( + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?FillColor = FillColor, + ?Opacity = Opacity, + ?Points = Points, + ?Jitter = Jitter, + ?PointPos = PointPos, + ?Width = Width, + ?MarkerColor = MarkerColor, + ?Marker = Marker, + ?OutlineColor = OutlineColor, + ?OutlineWidth = OutlineWidth, + ?Outline = Outline, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?ShowBox = ShowBox, + ?BoxWidth = BoxWidth, + ?BoxFillColor = BoxFillColor, + ?Box = Box, + ?BandWidth = BandWidth, + ?MeanLine = MeanLine, + ?ScaleGroup = ScaleGroup, + ?ScaleMode = ScaleMode, + ?Side = Side, + ?Span = Span, + ?SpanMode = SpanMode, + ?UseDefaults = UseDefaults + ) + + match orientation with + | StyleParam.Orientation.Horizontal -> violin |> GenericChart.mapTrace (Trace2DStyle.Violin(XEncoded = dataEncoded)) + | StyleParam.Orientation.Vertical -> violin |> GenericChart.mapTrace (Trace2DStyle.Violin(YEncoded = dataEncoded)) + + /// + /// Visualizes the distribution of the input data as a violin plot. + /// + /// A violin plot is a method of plotting numeric data. It is similar to a box plot, except that they also show the probability density of the data at different values, usually smoothed by a kernel density estimator. + /// + /// In vertical (horizontal) violin plots, statistics are computed using `y` (`x`) values. By supplying an `x` (`y`) array, one violin per distinct x (y) value is drawn If no `x` (`y`) array is provided, a single violin is drawn. That violin position is then positioned with with `name` or with `x0` (`y0`) if provided. + /// + /// Sets the xy sample data or coordinate pairs + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// If "outliers", only the sample points lying outside the whiskers are shown If "suspectedoutliers", the outlier points are shown and points either less than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`) If "all", all sample points are shown If "false", only the violins are shown with no sample points. Defaults to "suspectedoutliers" when `marker.outliercolor` or `marker.line.outliercolor` is set, otherwise defaults to "outliers". + /// Sets the amount of jitter in the sample points drawn. If "0", the sample points align along the distribution axis. If "1", the sample points are drawn in a random jitter of width equal to the width of the box(es). + /// Sets the position of the sample points in relation to the box(es). If "0", the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes + /// Sets the orientation of the violin(s). If "v" ("h"), the distribution is visualized along the vertical (horizontal). + /// Sets the width of the violin in data coordinates. If "0" (default value) the width is automatically selected based on the positions of other violin traces in the same subplot. + /// Sets the marker color. + /// Sets the marker for the violin (use this for more finegrained control than the other marker-associated arguments). + /// Sets the color of the box outline + /// Sets the width of the box outline + /// Sets the box outline (use this for more finegrained control than the other outline-associated arguments). + /// 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. + /// 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. + /// Whether and how to draw a miniature box plot + /// Sets the width of the miniature box plot + /// Sets the fill color of the miniature box plot + /// Sets the styles of the miniature box plot (use this for more finegrained control than the other box-associated arguments) + /// Sets the bandwidth used to compute the kernel density estimate. By default, the bandwidth is determined by Silverman's rule of thumb. + /// Whether and how to draw the meanline + /// If there are multiple violins that should be sized according to to some metric (see `scalemode`), link them by providing a non-empty group id here shared by every trace in the same group. If a violin's `width` is undefined, `scalegroup` will default to the trace's name. In this case, violins with the same names will be linked together + /// Sets the metric by which the width of each violin is determined."width" means each violin has the same (max) width"count" means the violins are scaled by the number of sample points makingup each violin. + /// Determines on which side of the position value the density function making up one half of a violin is plotted. Useful when comparing two violin traces under "overlay" mode, where one trace has `side` set to "positive" and the other to "negative". + /// Sets the span in data space for which the density function will be computed. Has an effect only when `spanmode` is set to "manual". + /// Sets the method by which the span in data space where the density function will be computed. "soft" means the span goes from the sample's minimum value minus two bandwidths to the sample's maximum value plus two bandwidths. "hard" means the span goes from the sample's minimum to its maximum value. For custom span settings, use mode "manual" and fill in the `span` attribute. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Violin + ( + xy: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?FillColor: Color, + ?Opacity: float, + ?Points: StyleParam.JitterPoints, + ?Jitter: float, + ?PointPos: float, + ?Orientation: StyleParam.Orientation, + ?Width: float, + ?MarkerColor: Color, + ?Marker: Marker, + ?OutlineColor: Color, + ?OutlineWidth: float, + ?Outline: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?ShowBox: bool, + ?BoxWidth: float, + ?BoxFillColor: Color, + ?Box: Box, + ?BandWidth: float, + ?MeanLine: MeanLine, + ?ScaleGroup: string, + ?ScaleMode: StyleParam.ScaleMode, + ?Side: StyleParam.ViolinSide, + ?Span: StyleParam.Range, + ?SpanMode: StyleParam.SpanMode, + ?UseDefaults: bool + ) = + + let x, y = Seq.unzip xy + + Chart.Violin( + X = x, + Y = y, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?FillColor = FillColor, + ?Opacity = Opacity, + ?Points = Points, + ?Jitter = Jitter, + ?PointPos = PointPos, + ?Orientation = Orientation, + ?Width = Width, + ?MarkerColor = MarkerColor, + ?Marker = Marker, + ?OutlineColor = OutlineColor, + ?OutlineWidth = OutlineWidth, + ?Outline = Outline, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?ShowBox = ShowBox, + ?BoxWidth = BoxWidth, + ?BoxFillColor = BoxFillColor, + ?Box = Box, + ?BandWidth = BandWidth, + ?MeanLine = MeanLine, + ?ScaleGroup = ScaleGroup, + ?ScaleMode = ScaleMode, + ?Side = Side, + ?Span = Span, + ?SpanMode = SpanMode, + ?UseDefaults = UseDefaults + ) + + diff --git a/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Finance.fs b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Finance.fs new file mode 100644 index 00000000..1cbb132d --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Finance.fs @@ -0,0 +1,618 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +open System.Runtime.CompilerServices + +open System.Runtime.InteropServices + +[] +module Chart2D_Finance = + [] + type Chart = + /// + /// Creates an OHLC chart. + /// + /// The ohlc (short for Open-High-Low-Close) is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The tip of the lines represent the `low` and `high` values and the horizontal segments represent the `open` and `close` values. Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing items are drawn in green whereas decreasing are drawn in red. + /// + /// Sets the open values. + /// Sets the high values. + /// Sets the low values. + /// Sets the close values. + /// Sets the x coordinates. If absent, linear coordinate will be generated. + /// Sets the x coordinates. If absent, linear coordinate will be generated. Use two inner arrays here to plot multicategorial data + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the line of this trace. + /// Sets the color of increasing values + /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of decreasing values + /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the width of the open/close tick marks relative to the "x" minimal interval. + /// Whether or not to show a rangeslider for the xaxis + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member OHLC + ( + ``open``: #IConvertible seq, + high: #IConvertible seq, + low: #IConvertible seq, + close: #IConvertible seq, + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Line: Line, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?TickWidth: float, + ?ShowXAxisRangeSlider: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let increasing = + Increasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?LineColor = IncreasingColor) + + let decreasing = + Decreasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?LineColor = DecreasingColor) + + Trace2D.initOHLC ( + Trace2DStyle.OHLC( + Open = ``open``, + High = high, + Low = low, + Close = close, + ?X = X, + ?MultiX = MultiX, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Line = Line, + Increasing = increasing, + Decreasing = decreasing, + ?TickWidth = TickWidth + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () + |> Layout.setLinearAxis ( + id = StyleParam.SubPlotId.XAxis 1, + axis = LinearAxis.init (RangeSlider = RangeSlider.init (?Visible = ShowXAxisRangeSlider)) + ) + ) + + /// + /// Creates an OHLC chart. + /// + /// The ohlc (short for Open-High-Low-Close) is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The tip of the lines represent the `low` and `high` values and the horizontal segments represent the `open` and `close` values. Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing items are drawn in green whereas decreasing are drawn in red. + /// + /// Sets the open values. + /// Sets the high values. + /// Sets the low values. + /// Sets the close values. + /// Sets the x coordinates. If absent, linear coordinate will be generated. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the line of this trace. + /// Sets the color of increasing values + /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of decreasing values + /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the width of the open/close tick marks relative to the "x" minimal interval. + /// Whether or not to show a rangeslider for the xaxis + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member OHLC + ( + ``open``: #IConvertible seq, + high: #IConvertible seq, + low: #IConvertible seq, + close: #IConvertible seq, + x: #IConvertible seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Line: Line, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?TickWidth: float, + ?ShowXAxisRangeSlider: bool, + ?UseDefaults: bool + ) = + + Chart.OHLC( + ``open`` = ``open``, + high = high, + low = low, + close = close, + X = x, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Line = Line, + ?IncreasingColor = IncreasingColor, + ?Increasing = Increasing, + ?DecreasingColor = DecreasingColor, + ?Decreasing = Decreasing, + ?TickWidth = TickWidth, + ?ShowXAxisRangeSlider = ShowXAxisRangeSlider, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates an OHLC chart from encoded financial arrays. + /// + /// Sets the open values as an encoded typed array. + /// Sets the high values as an encoded typed array. + /// Sets the low values as an encoded typed array. + /// Sets the close values as an encoded typed array. + /// Sets the x coordinates as an encoded typed array. If absent, linear coordinates will be generated. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the line of this trace. + /// Sets the color of increasing values + /// Sets the style options of increasing values. + /// Sets the color of decreasing values + /// Sets the style options of decreasing values. + /// Sets the width of the open/close tick marks. + /// Whether or not to show a rangeslider for the xaxis + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member OHLC + ( + openEncoded: EncodedTypedArray, + highEncoded: EncodedTypedArray, + lowEncoded: EncodedTypedArray, + closeEncoded: EncodedTypedArray, + ?xEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Line: Line, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?TickWidth: float, + ?ShowXAxisRangeSlider: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let increasing = + Increasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?LineColor = IncreasingColor) + + let decreasing = + Decreasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?LineColor = DecreasingColor) + + Trace2D.initOHLC ( + Trace2DStyle.OHLC( + OpenEncoded = openEncoded, + HighEncoded = highEncoded, + LowEncoded = lowEncoded, + CloseEncoded = closeEncoded, + ?XEncoded = xEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Line = Line, + Increasing = increasing, + Decreasing = decreasing, + ?TickWidth = TickWidth + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () + |> Layout.setLinearAxis ( + id = StyleParam.SubPlotId.XAxis 1, + axis = LinearAxis.init (RangeSlider = RangeSlider.init (?Visible = ShowXAxisRangeSlider)) + ) + ) + + /// + /// Creates an OHLC chart. + /// + /// The ohlc (short for Open-High-Low-Close) is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The tip of the lines represent the `low` and `high` values and the horizontal segments represent the `open` and `close` values. Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing items are drawn in green whereas decreasing are drawn in red. + /// + /// a series of (time,StockData), where StockData contains opwn, high, low and close values. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the line of this trace. + /// Sets the color of increasing values + /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of decreasing values + /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the width of the open/close tick marks relative to the "x" minimal interval. + /// Whether or not to show a rangeslider for the xaxis + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member OHLC + ( + stockTimeSeries: seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Line: Line, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?TickWidth: float, + ?ShowXAxisRangeSlider: bool, + ?UseDefaults: bool + ) = + + Chart.OHLC( + ``open`` = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Open))), + high = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.High))), + low = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Low))), + close = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Close))), + x = (stockTimeSeries |> Seq.map fst), + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Line = Line, + ?IncreasingColor = IncreasingColor, + ?Increasing = Increasing, + ?DecreasingColor = DecreasingColor, + ?Decreasing = Decreasing, + ?TickWidth = TickWidth, + ?ShowXAxisRangeSlider = ShowXAxisRangeSlider, + ?UseDefaults = UseDefaults + ) + + + + /// + /// Creates a candlestick chart. + /// + /// The candlestick is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The boxes represent the spread between the `open` and `close` values and the lines represent the spread between the `low` and `high` values Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing candles are drawn in green whereas decreasing are drawn in red. + /// + /// Sets the open values. + /// Sets the high values. + /// Sets the low values. + /// Sets the close values. + /// Sets the x coordinates. If absent, linear coordinate will be generated. + /// Sets the x coordinates. If absent, linear coordinate will be generated. Use two inner arrays here to plot multicategorial data + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the line of this trace. + /// Sets the color of increasing values + /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of decreasing values + /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). + /// Whether or not to show a rangeslider for the xaxis + /// If set to false, ignore the global default settings set in `Defaults` + static member Candlestick + ( + ``open``: #IConvertible seq, + high: #IConvertible seq, + low: #IConvertible seq, + close: #IConvertible seq, + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Line: Line, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?WhiskerWidth: float, + ?ShowXAxisRangeSlider: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let increasing = + Increasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?LineColor = IncreasingColor) + + let decreasing = + Decreasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?LineColor = DecreasingColor) + + Trace2D.initCandlestick ( + Trace2DStyle.Candlestick( + Open = ``open``, + High = high, + Low = low, + Close = close, + ?X = X, + ?MultiX = MultiX, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Line = Line, + Increasing = increasing, + Decreasing = decreasing, + ?WhiskerWidth = WhiskerWidth + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () + |> Layout.setLinearAxis ( + id = StyleParam.SubPlotId.XAxis 1, + axis = LinearAxis.init (RangeSlider = RangeSlider.init (?Visible = ShowXAxisRangeSlider)) + ) + ) + + /// + /// Creates a candlestick chart. + /// + /// The candlestick is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The boxes represent the spread between the `open` and `close` values and the lines represent the spread between the `low` and `high` values Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing candles are drawn in green whereas decreasing are drawn in red. + /// + /// Sets the open values. + /// Sets the high values. + /// Sets the low values. + /// Sets the close values. + /// Sets the x coordinates. If absent, linear coordinate will be generated. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the line of this trace. + /// Sets the color of increasing values + /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of decreasing values + /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). + /// Whether or not to show a rangeslider for the xaxis + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Candlestick + ( + ``open``: #IConvertible seq, + high: #IConvertible seq, + low: #IConvertible seq, + close: #IConvertible seq, + x: #IConvertible seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Line: Line, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?WhiskerWidth: float, + ?ShowXAxisRangeSlider: bool, + ?UseDefaults: bool + ) = + + Chart.Candlestick( + ``open`` = ``open``, + high = high, + low = low, + close = close, + X = x, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Line = Line, + ?IncreasingColor = IncreasingColor, + ?Increasing = Increasing, + ?DecreasingColor = DecreasingColor, + ?Decreasing = Decreasing, + ?WhiskerWidth = WhiskerWidth, + ?ShowXAxisRangeSlider = ShowXAxisRangeSlider, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a candlestick chart from encoded financial arrays. + /// + /// Sets the open values as an encoded typed array. + /// Sets the high values as an encoded typed array. + /// Sets the low values as an encoded typed array. + /// Sets the close values as an encoded typed array. + /// Sets the x coordinates as an encoded typed array. If absent, linear coordinates will be generated. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the line of this trace. + /// Sets the color of increasing values + /// Sets the style options of increasing values. + /// Sets the color of decreasing values + /// Sets the style options of decreasing values. + /// Sets the width of the whiskers relative to the box' width. + /// Whether or not to show a rangeslider for the xaxis + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Candlestick + ( + openEncoded: EncodedTypedArray, + highEncoded: EncodedTypedArray, + lowEncoded: EncodedTypedArray, + closeEncoded: EncodedTypedArray, + ?xEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Line: Line, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?WhiskerWidth: float, + ?ShowXAxisRangeSlider: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let increasing = + Increasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?LineColor = IncreasingColor) + + let decreasing = + Decreasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?LineColor = DecreasingColor) + + Trace2D.initCandlestick ( + Trace2DStyle.Candlestick( + OpenEncoded = openEncoded, + HighEncoded = highEncoded, + LowEncoded = lowEncoded, + CloseEncoded = closeEncoded, + ?XEncoded = xEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Line = Line, + Increasing = increasing, + Decreasing = decreasing, + ?WhiskerWidth = WhiskerWidth + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () + |> Layout.setLinearAxis ( + id = StyleParam.SubPlotId.XAxis 1, + axis = LinearAxis.init (RangeSlider = RangeSlider.init (?Visible = ShowXAxisRangeSlider)) + ) + ) + + /// + /// Creates a candlestick chart. + /// + /// The candlestick is a style of financial chart describing open, high, low and close for a given `x` coordinate (most likely time). The boxes represent the spread between the `open` and `close` values and the lines represent the spread between the `low` and `high` values Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing candles are drawn in green whereas decreasing are drawn in red. + /// + /// a series of (time,StockData), where StockData contains opwn, high, low and close values. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the line of this trace. + /// Sets the color of increasing values + /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of decreasing values + /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es). + /// Whether or not to show a rangeslider for the xaxis + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Candlestick + ( + stockTimeSeries: seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Line: Line, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?WhiskerWidth: float, + ?ShowXAxisRangeSlider: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + Chart.Candlestick( + ``open`` = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Open))), + high = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.High))), + low = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Low))), + close = (stockTimeSeries |> Seq.map (snd >> (fun x -> x.Close))), + x = (stockTimeSeries |> Seq.map fst), + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Line = Line, + ?IncreasingColor = IncreasingColor, + ?Increasing = Increasing, + ?DecreasingColor = DecreasingColor, + ?Decreasing = Decreasing, + ?WhiskerWidth = WhiskerWidth, + ?ShowXAxisRangeSlider = ShowXAxisRangeSlider, + ?UseDefaults = UseDefaults + ) + diff --git a/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Funnel.fs b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Funnel.fs new file mode 100644 index 00000000..453954e1 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Funnel.fs @@ -0,0 +1,733 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +open System.Runtime.CompilerServices + +open System.Runtime.InteropServices + +[] +module Chart2D_Funnel = + [] + type Chart = + [] + static member Funnel + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Width: float, + ?Offset: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?Orientation: StyleParam.Orientation, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?MarkerColor: Color, + ?MarkerOutline: Line, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?ConnectorLineColor: Color, + ?ConnectorLineStyle: StyleParam.DrawingStyle, + ?ConnectorFillColor: Color, + ?ConnectorLine: Line, + ?Connector: FunnelConnector, + ?InsideTextFont: Font, + ?OutsideTextFont: Font, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style (?Color = MarkerColor, ?Outline = MarkerOutline) + + let connectorLine = + ConnectorLine + |> Option.map (Plotly.NET.Line.style (?Color = ConnectorLineColor, ?Dash = ConnectorLineStyle)) + + let connector = + Connector + |> Option.defaultValue (TraceObjects.FunnelConnector.init ()) + |> TraceObjects.FunnelConnector.style (?FillColor = ConnectorFillColor, ?Line = connectorLine) + + Trace2D.initFunnel ( + Trace2DStyle.Funnel( + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + X = x, + Y = y, + ?Width = Width, + ?Offset = Offset, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Orientation = Orientation, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + Marker = marker, + ?TextInfo = TextInfo, + Connector = connector, + ?InsideTextFont = InsideTextFont, + ?OutsideTextFont = OutsideTextFont + + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a Funnel chart from encoded x and y coordinates. + /// + /// Funnel charts visualize stages in a process using length-encoded bars. This trace can be used to show data in either a part-to-whole representation wherein each item appears in a single stage, or in a "drop-off" representation wherein each item appears in each stage it traversed. See also the "funnelarea" trace type for a different approach to visualizing funnel data. + /// + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the bar width (in position axis units). + /// 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. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. + /// 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. + /// 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. + /// Sets the color of the bars. + /// Sets the color of the bar outline. + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Determines which trace information appear on the graph. In the case of having multiple funnels, percentages and totals are computed separately (per trace). + /// Sets the line color of the funnel connector + /// Sets the line style of the funnel connector + /// Sets the fill color of the funnel connector + /// Sets the line of the funnel connector (use this for more finegrained control than the other connector line associated arguments). + /// Sets the funnel connector (use this for more finegrained control than the other connector-associated arguments). + /// Sets the font used for `text` lying inside the bar. + /// Sets the font used for `text` lying outside the bar. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Funnel + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Width: float, + ?Offset: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?Orientation: StyleParam.Orientation, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?MarkerColor: Color, + ?MarkerOutline: Line, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?ConnectorLineColor: Color, + ?ConnectorLineStyle: StyleParam.DrawingStyle, + ?ConnectorFillColor: Color, + ?ConnectorLine: Line, + ?Connector: FunnelConnector, + ?InsideTextFont: Font, + ?OutsideTextFont: Font, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style (?Color = MarkerColor, ?Outline = MarkerOutline) + + let connectorLine = + ConnectorLine + |> Option.map (Plotly.NET.Line.style (?Color = ConnectorLineColor, ?Dash = ConnectorLineStyle)) + + let connector = + Connector + |> Option.defaultValue (TraceObjects.FunnelConnector.init ()) + |> TraceObjects.FunnelConnector.style (?FillColor = ConnectorFillColor, ?Line = connectorLine) + + Trace2D.initFunnel ( + Trace2DStyle.Funnel( + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + XEncoded = xEncoded, + YEncoded = yEncoded, + ?Width = Width, + ?Offset = Offset, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Orientation = Orientation, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + Marker = marker, + ?TextInfo = TextInfo, + Connector = connector, + ?InsideTextFont = InsideTextFont, + ?OutsideTextFont = OutsideTextFont + + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a stacked Funnel chart, a variation of the funnel chart where multiple funnel bars of each stage are stacked on top of each other. + /// To create this type of chart, combine multiple of these charts via `Chart.combine`. + /// + /// Funnel charts visualize stages in a process using length-encoded bars. This trace can be used to show data in either a part-to-whole representation wherein each item appears in a single stage, or in a "drop-off" representation wherein each item appears in each stage it traversed. See also the "funnelarea" trace type for a different approach to visualizing funnel data. + /// + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the bar width (in position axis units). + /// 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. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. + /// 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. + /// 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. + /// Sets the color of the bars. + /// Sets the color of the bar outline. + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Determines which trace information appear on the graph. In the case of having multiple funnels, percentages and totals are computed separately (per trace). + /// Sets the line color of the funnel connector + /// Sets the line style of the funnel connector + /// Sets the fill color of the funnel connector + /// Sets the line of the funnel connector (use this for more finegrained control than the other connector line associated arguments). + /// Sets the funnel connector (use this for more finegrained control than the other connector-associated arguments). + /// Sets the font used for `text` lying inside the bar. + /// Sets the font used for `text` lying outside the bar. + /// If set to false, ignore the global default settings set in `Defaults` + static member StackedFunnel + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Width: float, + ?Offset: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?Orientation: StyleParam.Orientation, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?MarkerColor: Color, + ?MarkerOutline: Line, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?ConnectorLineColor: Color, + ?ConnectorLineStyle: StyleParam.DrawingStyle, + ?ConnectorFillColor: Color, + ?ConnectorLine: Line, + ?Connector: FunnelConnector, + ?InsideTextFont: Font, + ?OutsideTextFont: Font, + ?UseDefaults: bool + ) = + Chart.Funnel( + x = x, + y = y, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Width = Width, + ?Offset = Offset, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Orientation = Orientation, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?MarkerColor = MarkerColor, + ?MarkerOutline = MarkerOutline, + ?Marker = Marker, + ?TextInfo = TextInfo, + ?ConnectorLineColor = ConnectorLineColor, + ?ConnectorLineStyle = ConnectorLineStyle, + ?ConnectorFillColor = ConnectorFillColor, + ?ConnectorLine = ConnectorLine, + ?Connector = Connector, + ?InsideTextFont = InsideTextFont, + ?OutsideTextFont = OutsideTextFont, + ?UseDefaults = UseDefaults + + ) + |> GenericChart.mapLayout (Layout.style (FunnelMode = StyleParam.FunnelMode.Stack)) + + /// Creates a stacked funnel chart from encoded x and y coordinates. + [] + static member StackedFunnel + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Width: float, + ?Offset: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?Orientation: StyleParam.Orientation, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?MarkerColor: Color, + ?MarkerOutline: Line, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?ConnectorLineColor: Color, + ?ConnectorLineStyle: StyleParam.DrawingStyle, + ?ConnectorFillColor: Color, + ?ConnectorLine: Line, + ?Connector: FunnelConnector, + ?InsideTextFont: Font, + ?OutsideTextFont: Font, + ?UseDefaults: bool + ) = + Chart.Funnel( + xEncoded = xEncoded, + yEncoded = yEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Width = Width, + ?Offset = Offset, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Orientation = Orientation, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?MarkerColor = MarkerColor, + ?MarkerOutline = MarkerOutline, + ?Marker = Marker, + ?TextInfo = TextInfo, + ?ConnectorLineColor = ConnectorLineColor, + ?ConnectorLineStyle = ConnectorLineStyle, + ?ConnectorFillColor = ConnectorFillColor, + ?ConnectorLine = ConnectorLine, + ?Connector = Connector, + ?InsideTextFont = InsideTextFont, + ?OutsideTextFont = OutsideTextFont, + ?UseDefaults = UseDefaults + ) + |> GenericChart.mapLayout (Layout.style (FunnelMode = StyleParam.FunnelMode.Stack)) + + /// + /// Creates a waterfall chart. + /// + /// Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values + /// + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the color of increasing values + /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of decreasing values + /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of total values + /// Sets the style options of total values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units). + /// Sets the individual bar width of each datum (in position axis units). + /// Sets the opacity of the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the font used for `text`. + /// Sets the waterfall connector of this trace + /// An array containing types of measures. 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. + /// 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. + /// 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. + /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Waterfall + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?TotalsColor: Color, + ?Totals: FinanceMarker, + ?Base: float, + ?Width: float, + ?MultiWidth: seq, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?TextFont: Font, + ?Connector: WaterfallConnector, + ?Measure: StyleParam.WaterfallMeasure seq, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?Orientation: StyleParam.Orientation, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let increasing = + Increasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?FillColor = IncreasingColor) + + let decreasing = + Decreasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?FillColor = DecreasingColor) + + let totals = + Totals + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?FillColor = TotalsColor) + + Trace2D.initWaterfall ( + Trace2DStyle.Waterfall( + X = x, + Y = y, + ?Name = Name, + ?ShowLegend = ShowLegend, + Increasing = increasing, + Decreasing = decreasing, + Totals = totals, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?TextFont = TextFont, + ?Connector = Connector, + ?Measure = Measure, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?Orientation = Orientation + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a waterfall chart from encoded x and y coordinates. + /// + /// Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values + /// + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the color of increasing values + /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of decreasing values + /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of total values + /// Sets the style options of total values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units). + /// Sets the individual bar width for each bar as an encoded typed array. + /// Sets the opacity of the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the font used for `text`. + /// Sets the waterfall connector of this trace + /// An array containing types of measures. 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. + /// 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. + /// 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. + /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Waterfall + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?TotalsColor: Color, + ?Totals: FinanceMarker, + ?Base: float, + ?Width: float, + ?MultiWidthEncoded: EncodedTypedArray, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?TextFont: Font, + ?Connector: WaterfallConnector, + ?Measure: StyleParam.WaterfallMeasure seq, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?Orientation: StyleParam.Orientation, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let increasing = + Increasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?FillColor = IncreasingColor) + + let decreasing = + Decreasing + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?FillColor = DecreasingColor) + + let totals = + Totals + |> Option.defaultValue (FinanceMarker.init ()) + |> FinanceMarker.style (?FillColor = TotalsColor) + + Trace2D.initWaterfall ( + Trace2DStyle.Waterfall( + XEncoded = xEncoded, + YEncoded = yEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + Increasing = increasing, + Decreasing = decreasing, + Totals = totals, + ?Base = Base, + ?Width = Width, + ?MultiWidthEncoded = MultiWidthEncoded, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?TextFont = TextFont, + ?Connector = Connector, + ?Measure = Measure, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?Orientation = Orientation + ) + ) + |> GenericChart.ofTraceObject useDefaults + + + /// + /// Creates a waterfall chart. + /// + /// Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values + /// + /// Sets the x and y coordinates of the plotted data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the color of increasing values + /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of decreasing values + /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of total values + /// Sets the style options of total values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units). + /// Sets the individual bar width of each datum (in position axis units). + /// Sets the opacity of the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the font used for `text`. + /// Sets the waterfall connector of this trace + /// An array containing types of measures. 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. + /// 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. + /// 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. + /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Waterfall + ( + xy: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?TotalsColor: Color, + ?Totals: FinanceMarker, + ?Base: float, + ?Width: float, + ?MultiWidth: seq, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?TextFont: Font, + ?Connector: WaterfallConnector, + ?Measure: StyleParam.WaterfallMeasure seq, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?Orientation: StyleParam.Orientation, + ?UseDefaults: bool + ) = + + let x, y = Seq.unzip xy + + Chart.Waterfall( + x = x, + y = y, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?IncreasingColor = IncreasingColor, + ?Increasing = Increasing, + ?DecreasingColor = DecreasingColor, + ?Decreasing = Decreasing, + ?TotalsColor = TotalsColor, + ?Totals = Totals, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?TextFont = TextFont, + ?Connector = Connector, + ?Measure = Measure, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?Orientation = Orientation, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a waterfall chart. + /// + /// Waterfall charts are special bar charts that help visualizing the cumulative effect of sequentially introduced positive or negative values + /// + /// Sets the x and y coordinates of the plotted data, together with a measure for each (x,y) pair that defines the type of computation done for each pair. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the color of increasing values + /// Sets the style options of increasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of decreasing values + /// Sets the style options of decreasing values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets the color of total values + /// Sets the style options of total values (use this for more finegrained control than the other increasing-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units). + /// Sets the individual bar width of each datum (in position axis units). + /// Sets the opacity of the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the font used for `text`. + /// Sets the waterfall connector of this trace + /// 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. + /// 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. + /// Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Waterfall + ( + xymeasures: seq<#IConvertible * #IConvertible * StyleParam.WaterfallMeasure>, + ?Name: string, + ?ShowLegend: bool, + ?IncreasingColor: Color, + ?Increasing: FinanceMarker, + ?DecreasingColor: Color, + ?Decreasing: FinanceMarker, + ?TotalsColor: Color, + ?Totals: FinanceMarker, + ?Base: float, + ?Width: float, + ?MultiWidth: seq, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?TextFont: Font, + ?Connector: WaterfallConnector, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?Orientation: StyleParam.Orientation, + ?UseDefaults: bool + ) = + + let x, y, measure = Seq.unzip3 xymeasures + + Chart.Waterfall( + x = x, + y = y, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?IncreasingColor = IncreasingColor, + ?Increasing = Increasing, + ?DecreasingColor = DecreasingColor, + ?Decreasing = Decreasing, + ?TotalsColor = TotalsColor, + ?Totals = Totals, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?TextFont = TextFont, + ?Connector = Connector, + Measure = measure, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?Orientation = Orientation, + ?UseDefaults = UseDefaults + ) + diff --git a/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Heatmap.fs b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Heatmap.fs new file mode 100644 index 00000000..bec63d37 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Heatmap.fs @@ -0,0 +1,816 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +open System.Runtime.CompilerServices + +open System.Runtime.InteropServices + +[] +module Chart2D_Heatmap = + [] + type Chart = + [] + static member internal renderHeatmapTrace (useDefaults: bool) (useWebGL: bool) (style: Trace2D -> Trace2D) = + if useWebGL then + Trace2D.initHeatmapGL style |> GenericChart.ofTraceObject useDefaults + else + Trace2D.initHeatmap style |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a heatmap. + /// + /// A heatmap is a data visualization technique that shows magnitude of a phenomenon as color in two dimensions. + /// + /// Sets the 2-dimensional z data, which will be visualized with the color scale. + /// Sets the x coordinates + /// Sets the x coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the y coordinates + /// Sets the y coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets the horizontal gap (in pixels) between bricks. + /// Sets the vertical gap (in pixels) between bricks. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Picks a smoothing algorithm use to smooth `z` data. + /// Transposes the z data. + /// Whether or not to use WebGL to render this trace + /// Whether or not to reverse the y axis. If true, (0,0) will lie on the top left and increase downwards. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Heatmap + ( + zData: seq<#seq<#IConvertible>>, + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?Y: seq<#IConvertible>, + ?MultiY: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?XGap: int, + ?YGap: int, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?ZSmooth: StyleParam.SmoothAlg, + ?Transpose: bool, + ?UseWebGL: bool, + ?ReverseYAxis: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let reverseYAxis = + defaultArg ReverseYAxis false + + let style = + Trace2DStyle.Heatmap( + Z = zData, + ?X = X, + ?MultiX = MultiX, + ?Y = Y, + ?MultiY = MultiY, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?XGap = XGap, + ?YGap = YGap, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?ZSmooth = ZSmooth, + ?Transpose = Transpose + ) + + let useWebGL = defaultArg UseWebGL false + + Chart.renderHeatmapTrace useDefaults useWebGL style + |> fun c -> + if reverseYAxis then + c |> Chart.withYAxis (LinearAxis.init (AutoRange = StyleParam.AutoRange.Reversed)) + else + c + + /// + /// Creates a heatmap from an encoded z matrix and optional encoded axes. + /// + /// Sets the 2-dimensional z data as an encoded typed array. + /// Sets the x coordinates as an encoded typed array. + /// Sets the y coordinates as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets the horizontal gap (in pixels) between bricks. + /// Sets the vertical gap (in pixels) between bricks. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. + /// Picks a smoothing algorithm use to smooth `z` data. + /// Transposes the z data. + /// Whether or not to use WebGL to render this trace + /// Whether or not to reverse the y axis. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Heatmap + ( + zEncoded: EncodedTypedArray, + ?xEncoded: EncodedTypedArray, + ?yEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?XGap: int, + ?YGap: int, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?ZSmooth: StyleParam.SmoothAlg, + ?Transpose: bool, + ?UseWebGL: bool, + ?ReverseYAxis: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let reverseYAxis = + defaultArg ReverseYAxis false + + let style = + Trace2DStyle.Heatmap( + ZEncoded = zEncoded, + ?XEncoded = xEncoded, + ?YEncoded = yEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?XGap = XGap, + ?YGap = YGap, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?ZSmooth = ZSmooth, + ?Transpose = Transpose + ) + + let useWebGL = defaultArg UseWebGL false + + Chart.renderHeatmapTrace useDefaults useWebGL style + |> fun c -> + if reverseYAxis then + c |> Chart.withYAxis (LinearAxis.init (AutoRange = StyleParam.AutoRange.Reversed)) + else + c + + /// + /// Creates a heatmap. + /// + /// A heatmap is a data visualization technique that shows magnitude of a phenomenon as color in two dimensions. + /// + /// Sets the 2-dimensional z data, which will be visualized with the color scale. + /// Sets names for each column (as x coordinates) + /// Sets names for each row (as y coordinates) + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets the horizontal gap (in pixels) between bricks. + /// Sets the vertical gap (in pixels) between bricks. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Picks a smoothing algorithm use to smooth `z` data. + /// Transposes the z data. + /// Whether or not to use WebGL to render this trace + /// Whether or not to reverse the y axis. If true, (0,0) will lie on the top left and increase downwards. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Heatmap + ( + zData: seq<#seq<#IConvertible>>, + colNames: seq, + rowNames: seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?XGap: int, + ?YGap: int, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?ZSmooth: StyleParam.SmoothAlg, + ?Transpose: bool, + ?UseWebGL: bool, + ?ReverseYAxis: bool, + ?UseDefaults: bool + ) = + + Chart.Heatmap( + zData = zData, + X = colNames, + Y = rowNames, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?XGap = XGap, + ?YGap = YGap, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?ZSmooth = ZSmooth, + ?Transpose = Transpose, + ?UseWebGL = UseWebGL, + ?ReverseYAxis = ReverseYAxis, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a annotated heatmap. + /// + /// A heatmap is a data visualization technique that shows magnitude of a phenomenon as color in two dimensions. + /// + /// The annotated heatmap additionally contains annotation text on each datum. + /// + /// Sets the 2-dimensional z data, which will be visualized with the color scale. + /// Sets the text to display as annotation for each datum. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets the x coordinates. + /// Sets the x coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the horizontal gap (in pixels) between bricks. + /// Sets the y coordinates. + /// Sets the y coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the vertical gap (in pixels) between bricks. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Picks a smoothing algorithm use to smooth `z` data. + /// Transposes the z data. + /// Whether or not to use WebGL to render this trace + /// Whether or not to reverse the y axis. If true, (0,0) will lie on the top left and increase downwards. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member AnnotatedHeatmap + ( + zData: seq<#seq<#IConvertible>>, + annotationText: seq<#seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?XGap: int, + ?Y: seq<#IConvertible>, + ?MultiY: seq>, + ?YGap: int, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?ZSmooth: StyleParam.SmoothAlg, + ?Transpose: bool, + ?UseWebGL: bool, + ?ReverseYAxis: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let reverseYAxis = + defaultArg ReverseYAxis false + + let dims = Seq.length zData + let dims2 = Seq.length annotationText + + if dims <> dims2 then + failwith "incompatible dims" + + let style = + Trace2DStyle.Heatmap( + Z = zData, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?X = X, + ?MultiX = MultiX, + ?XGap = XGap, + ?Y = Y, + ?MultiY = MultiY, + ?YGap = YGap, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?ZSmooth = ZSmooth, + ?Transpose = Transpose + ) + + let useWebGL = defaultArg UseWebGL false + + Chart.renderHeatmapTrace useDefaults useWebGL style + |> fun c -> + if reverseYAxis then + c |> Chart.withYAxis (LinearAxis.init (AutoRange = StyleParam.AutoRange.Reversed)) + else + c + |> Chart.withAnnotations ( + annotationText + |> Seq.mapi (fun y inner -> + inner |> Seq.mapi (fun x text -> Annotation.init (x, y, Text = (string text), ShowArrow = false))) + |> Seq.concat + ) + + + /// + /// Creates a annotated heatmap. + /// + /// A heatmap is a data visualization technique that shows magnitude of a phenomenon as color in two dimensions. + /// + /// The annotated heatmap additionally contains annotation text on each datum. + /// + /// Sets the 2-dimensional z data, which will be visualized with the color scale together with the respective annotation text. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets the x coordinates. + /// Sets the x coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the horizontal gap (in pixels) between bricks. + /// Sets the y coordinates. + /// Sets the y coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the vertical gap (in pixels) between bricks. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Picks a smoothing algorithm use to smooth `z` data. + /// Transposes the z data. + /// Whether or not to use WebGL to render this trace + /// Whether or not to reverse the y axis. If true, (0,0) will lie on the top left and increase downwards. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member AnnotatedHeatmap + ( + dataAnnotations: seq<#seq<#IConvertible * string>>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?XGap: int, + ?Y: seq<#IConvertible>, + ?MultiY: seq>, + ?YGap: int, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?ZSmooth: StyleParam.SmoothAlg, + ?Transpose: bool, + ?UseWebGL: bool, + ?ReverseYAxis: bool, + ?UseDefaults: bool + ) = + + let zData = + dataAnnotations |> Seq.map (Seq.map fst) + + let annotationText = + dataAnnotations |> Seq.map (Seq.map snd) + + Chart.AnnotatedHeatmap( + zData = zData, + annotationText = annotationText, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?X = X, + ?MultiX = MultiX, + ?XGap = XGap, + ?Y = Y, + ?MultiY = MultiY, + ?YGap = YGap, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?ZSmooth = ZSmooth, + ?Transpose = Transpose, + ?UseWebGL = UseWebGL, + ?ReverseYAxis = ReverseYAxis, + ?UseDefaults = UseDefaults + ) + + /// + /// Display an image, i.e. data on a 2D regular raster. By default, when an image is displayed in a subplot, its y axis will be reversed (ie. `autorange: 'reversed'`), constrained to the domain (ie. `constrain: 'domain'`) and it will have the same scale as its x axis (ie. `scaleanchor: 'x,`) in order for pixels to be rendered as squares. + /// + /// A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color. + /// Specifies the data URI of the image to be visualized. The URI consists of "data:image/[<media subtype>][;base64],<data>" + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. + /// Color model used to map the numerical color components described in `z` into colors. If `source` is specified, this attribute will be set to `rgba256` otherwise it defaults to `rgb`. + /// Sets the upper bound of the color domain. Value should have the same units as in `z` and if set, `zmin` must be set as well. + /// Sets the lower bound of the color domain. Value should have the same units as in `z` and if set, `zmax` must be set as well. + /// Picks a smoothing algorithm use to smooth `z` data. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Image + ( + ?Z: seq<#seq<#seq>>, + ?Source: string, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Ids: seq<#IConvertible>, + ?ColorModel: StyleParam.ColorModel, + ?ZMax: StyleParam.ColorComponentBound, + ?ZMin: StyleParam.ColorComponentBound, + ?ZSmooth: StyleParam.SmoothAlg, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + Trace2D.initImage ( + Trace2DStyle.Image( + ?Z = Z, + ?Source = Source, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Ids = Ids, + ?ColorModel = ColorModel, + ?ZMax = ZMax, + ?ZMin = ZMin, + ?ZSmooth = ZSmooth + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Display an image, i.e. data on a 2D regular raster. By default, when an image is displayed in a subplot, its y axis will be reversed (ie. `autorange: 'reversed'`), constrained to the domain (ie. `constrain: 'domain'`) and it will have the same scale as its x axis (ie. `scaleanchor: 'x,`) in order for pixels to be rendered as squares. + /// + /// A 2-dimensional array containing Plotly.NETs ARGB color object. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. + /// Sets the upper bound of the color domain. Value should have the same units as in `z` and if set, `zmin` must be set as well. + /// Sets the lower bound of the color domain. Value should have the same units as in `z` and if set, `zmax` must be set as well. + /// Picks a smoothing algorithm use to smooth `z` data. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Image + ( + z: seq<#seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Ids: seq<#IConvertible>, + ?ZMax: StyleParam.ColorComponentBound, + ?ZMin: StyleParam.ColorComponentBound, + ?ZSmooth: StyleParam.SmoothAlg, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let z' = + z + |> Seq.map ( + Seq.map (fun argb -> + seq { + int argb.R + int argb.G + int argb.B + int argb.A + }) + ) + + + Trace2D.initImage ( + Trace2DStyle.Image( + Z = z', + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Ids = Ids, + ColorModel = StyleParam.ColorModel.RGBA, + ?ZMax = ZMax, + ?ZMin = ZMin, + ?ZSmooth = ZSmooth + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a 2D contour plot, which shows the contour lines of a 2D numerical array z, i.e. interpolated lines of isovalues of z. + /// + /// A contour line (also isoline, isopleth, or isarithm) of a function of two variables is a curve along which the function has a constant value, so that the curve joins points of equal value + /// + /// The data from which contour lines are computed is set in `z`. Data in `z` must be a 2D array of numbers. Say that `z` has N rows and M columns, then by default, these N rows correspond to N y coordinates (set in `y` or auto-generated) and the M columns correspond to M x coordinates (set in `x` or auto-generated). By setting `transpose` to "true", the above behavior is flipped. + /// + /// Sets the z data which is used for computing the contour lines. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets the x coordinates. + /// Sets the x coordinates. Use two inner arrays here to plot multicategorial data + /// Sets the y coordinates. + /// Sets the y coordinates. Use two inner arrays here to plot multicategorial data + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Transposes the z data. + /// Sets the contour line dash style + /// Sets the contour line color + /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. + /// Sets the width of the contour lines + /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). + /// Wether or not to show the contour line + /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. + /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. + /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. + /// Determines whether to label the contour lines with their values. + /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. + /// Sets the starting contour level value. Must be less than `contours.end` + /// Sets the end contour level value. Must be more than `contours.start` + /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). + /// Sets the fill color if `contours.type` is "constraint". Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of `ncontours`. Has an effect only if `autocontour` is "true" or if `contours.size` is missing. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Contour + ( + zData: seq<#seq<#IConvertible>>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?Y: seq<#IConvertible>, + ?MultiY: seq>, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?Transpose: bool, + ?ContourLinesColor: Color, + ?ContourLinesDash: StyleParam.DrawingStyle, + ?ContourLinesSmoothing: float, + ?ContourLinesWidth: float, + ?ContourLines: Line, + ?ShowContourLines: bool, + ?ContoursColoring: StyleParam.ContourColoring, + ?ContoursOperation: StyleParam.ConstraintOperation, + ?ContoursType: StyleParam.ContourType, + ?ShowContoursLabels: bool, + ?ContoursLabelFont: Font, + ?ContoursStart: float, + ?ContoursEnd: float, + ?Contours: Contours, + ?FillColor: Color, + ?NContours: int, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let showContourLines = + defaultArg ShowContourLines false + + let contourLinesWidth = + ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. + + let contours = + Contours + |> Option.defaultValue (TraceObjects.Contours.init ()) + |> TraceObjects.Contours.style ( + ?Coloring = ContoursColoring, + ?Operation = ContoursOperation, + ?Start = ContoursStart, + ?End = ContoursEnd, + ?Type = ContoursType, + ?ShowLabels = ShowContoursLabels, + ?LabelFont = ContoursLabelFont + ) + + let contourLines = + ContourLines + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + Width = contourLinesWidth, + ?Color = ContourLinesColor, + ?Dash = ContourLinesDash, + ?Smoothing = ContourLinesSmoothing + ) + + Trace2D.initContour ( + Trace2DStyle.Contour( + Z = zData, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?X = X, + ?MultiX = MultiX, + ?Y = Y, + ?MultiY = MultiY, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?Transpose = Transpose, + ?FillColor = FillColor, + ?NContours = NContours, + Contours = contours, + Line = contourLines + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a contour chart from an encoded z matrix and optional encoded axes. + /// + /// Sets the 2-dimensional z data as an encoded typed array. + /// Sets the x coordinates as an encoded typed array. + /// Sets the y coordinates as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. + /// Transposes the z data. + /// Sets the contour line dash style + /// Sets the contour line color + /// Sets the amount of smoothing for the contour lines. + /// Sets the width of the contour lines + /// Sets the contour lines. + /// Wether or not to show the contour line + /// Determines the coloring method showing the contour values. + /// Sets the constraint operation. + /// Sets the contour representation type. + /// Determines whether to label the contour lines with their values. + /// Sets the font used for labeling the contour levels. + /// Sets the starting contour level value. + /// Sets the end contour level value. + /// Sets the styles of the contours. + /// Sets the fill color if `contours.type` is "constraint". + /// Sets the maximum number of contour levels. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Contour + ( + zEncoded: EncodedTypedArray, + ?xEncoded: EncodedTypedArray, + ?yEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?Transpose: bool, + ?ContourLinesColor: Color, + ?ContourLinesDash: StyleParam.DrawingStyle, + ?ContourLinesSmoothing: float, + ?ContourLinesWidth: float, + ?ContourLines: Line, + ?ShowContourLines: bool, + ?ContoursColoring: StyleParam.ContourColoring, + ?ContoursOperation: StyleParam.ConstraintOperation, + ?ContoursType: StyleParam.ContourType, + ?ShowContoursLabels: bool, + ?ContoursLabelFont: Font, + ?ContoursStart: float, + ?ContoursEnd: float, + ?Contours: Contours, + ?FillColor: Color, + ?NContours: int, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let showContourLines = + defaultArg ShowContourLines false + + let contourLinesWidth = + ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. + + let contours = + Contours + |> Option.defaultValue (TraceObjects.Contours.init ()) + |> TraceObjects.Contours.style ( + ?Coloring = ContoursColoring, + ?Operation = ContoursOperation, + ?Start = ContoursStart, + ?End = ContoursEnd, + ?Type = ContoursType, + ?ShowLabels = ShowContoursLabels, + ?LabelFont = ContoursLabelFont + ) + + let contourLines = + ContourLines + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + Width = contourLinesWidth, + ?Color = ContourLinesColor, + ?Dash = ContourLinesDash, + ?Smoothing = ContourLinesSmoothing + ) + + Trace2D.initContour ( + Trace2DStyle.Contour( + ZEncoded = zEncoded, + ?XEncoded = xEncoded, + ?YEncoded = yEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?Transpose = Transpose, + ?FillColor = FillColor, + ?NContours = NContours, + Contours = contours, + Line = contourLines + ) + ) + |> GenericChart.ofTraceObject useDefaults + diff --git a/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Histogram.fs b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Histogram.fs new file mode 100644 index 00000000..8a48c440 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Histogram.fs @@ -0,0 +1,979 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +open System.Runtime.CompilerServices + +open System.Runtime.InteropServices + +[] +module Chart2D_Histogram = + [] + type Chart = + /// + /// Visualizes the distribution of the input data as a histogram. + /// + /// A histogram is an approximate representation of the distribution of numerical data. To construct a histogram, the first step is to "bin" the range of values - that is, divide the entire range of values into a series of intervals - and then count how many values fall into each interval. + /// The bins are usually specified as consecutive, non-overlapping intervals of a variable. + /// + /// The sample data from which statistics are computed is set in `x` for vertically spanning histograms and in `y` for horizontally spanning histograms. Binning options are set `xbins` and `ybins` respectively if no aggregation data is provided. + /// + /// Sets the sample data to be binned on the x axis. + /// Sets the sample data to be binned on the x axis. Use two inner arrays here to plot multicategorial data + /// Sets the sample data to be binned on the y axis. + /// Sets the sample data to be binned on the y axis. Use two inner arrays here to plot multicategorial data + /// Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal). + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. + /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). + /// 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. + /// 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. + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. + /// Set a group of histogram traces which will have compatible bin settings. Note that traces on the same subplot and with the same "orientation" under `barmode` "stack", "relative" and "group" are forced into the same bingroup, Using `bingroup`, traces under `barmode` "overlay" and on different axes (of the same axis type) can have compatible bin settings. Note that histogram and histogram2d" trace can share the same `bingroup` + /// Sets the binning across the x dimension + /// Sets the binning across the y dimension + /// Sets the color of the bars + /// Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values. + /// Sets the color of the bar outlines + /// Sets a pattern shape for all bars + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker of this trace. + /// Sets the outline of the histogram's bars. + /// Sets the x error of this trace. + /// Sets the y error of this trace. + /// Sets whether and how the cumulative distribution is displayed + /// Sets the style of the hoverlabels of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Histogram + ( + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?Y: seq<#IConvertible>, + ?MultiY: seq>, + ?Orientation: StyleParam.Orientation, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?HistFunc: StyleParam.HistFunc, + ?HistNorm: StyleParam.HistNorm, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?NBinsX: int, + ?NBinsY: int, + ?BinGroup: string, + ?XBins: Bins, + ?YBins: Bins, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Line: Line, + ?XError: Error, + ?YError: Error, + ?Cumulative: Cumulative, + ?HoverLabel: Hoverlabel, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + Pattern = pattern, + ?Colorscale = MarkerColorScale, + ?Outline = MarkerOutline + ) + + Trace2D.initHistogram ( + Trace2DStyle.Histogram( + ?X = X, + ?MultiX = MultiX, + ?Y = Y, + ?MultiY = MultiY, + ?Orientation = Orientation, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?HistFunc = HistFunc, + ?HistNorm = HistNorm, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?NBinsX = NBinsX, + ?NBinsY = NBinsY, + ?BinGroup = BinGroup, + ?XBins = XBins, + ?YBins = YBins, + Marker = marker, + ?Line = Line, + ?XError = XError, + ?YError = YError, + ?Cumulative = Cumulative, + ?HoverLabel = HoverLabel + ) + ) + |> GenericChart.ofTraceObject useDefaults + + + /// + /// Visualizes the distribution of the input data as a histogram, automatically determining if the data is to be used for the x or y dimension based on the `orientation` parameter. + /// + /// A histogram is an approximate representation of the distribution of numerical data. To construct a histogram, the first step is to "bin" the range of values - that is, divide the entire range of values into a series of intervals - and then count how many values fall into each interval. + /// The bins are usually specified as consecutive, non-overlapping intervals of a variable. + /// + /// Binning options are set `xbins` and `ybins` respectively if no aggregation data is provided. + /// + /// Sets the sample data to be binned + /// Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal). + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. + /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). + /// 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. + /// 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. + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. + /// Set a group of histogram traces which will have compatible bin settings. Note that traces on the same subplot and with the same "orientation" under `barmode` "stack", "relative" and "group" are forced into the same bingroup, Using `bingroup`, traces under `barmode` "overlay" and on different axes (of the same axis type) can have compatible bin settings. Note that histogram and histogram2d" trace can share the same `bingroup` + /// Sets the binning across the x dimension + /// Sets the binning across the y dimension + /// Sets the color of the histogram's bars. + /// Sets the marker for the histogram's bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets the outline of the histogram's bars. + /// Sets the x error of this trace. + /// Sets the y error of this trace. + /// Sets whether and how the cumulative distribution is displayed + /// Sets the style of the hoverlabels of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Histogram + ( + data: seq<#IConvertible>, + orientation: StyleParam.Orientation, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?HistFunc: StyleParam.HistFunc, + ?HistNorm: StyleParam.HistNorm, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?NBinsX: int, + ?NBinsY: int, + ?BinGroup: string, + ?XBins: Bins, + ?YBins: Bins, + ?MarkerColor: Color, + ?Marker: Marker, + ?Line: Line, + ?XError: Error, + ?YError: Error, + ?Cumulative: Cumulative, + ?HoverLabel: Hoverlabel, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let histChart = + Trace2D.initHistogram ( + Trace2DStyle.Histogram( + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + Orientation = orientation, + ?HistFunc = HistFunc, + ?HistNorm = HistNorm, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?NBinsX = NBinsX, + ?NBinsY = NBinsY, + ?BinGroup = BinGroup, + ?XBins = XBins, + ?YBins = YBins, + ?Marker = Marker, + ?Line = Line, + ?XError = XError, + ?YError = YError, + ?Cumulative = Cumulative, + ?HoverLabel = HoverLabel + ) + ) + |> TraceStyle.Marker(?Color = MarkerColor) + |> TraceStyle.TraceInfo(?Name = Name, ?ShowLegend = ShowLegend) + |> GenericChart.ofTraceObject useDefaults + + match orientation with + | StyleParam.Orientation.Horizontal -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(Y = data)) + | StyleParam.Orientation.Vertical -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(X = data)) + + /// + /// Visualizes the distribution of the input data as a histogram using an encoded typed array. + /// + /// Sets the sample data to be binned as an encoded typed array. + /// Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal). + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Specifies the binning function used for this histogram trace. + /// Specifies the type of normalization used for this histogram trace. + /// Set several traces linked to the same position axis or matching axes to the same alignmentgroup. + /// 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. + /// Specifies the maximum number of desired bins. + /// Specifies the maximum number of desired bins. + /// Set a group of histogram traces which will have compatible bin settings. + /// Sets the binning across the x dimension + /// Sets the binning across the y dimension + /// Sets the color of the histogram's bars. + /// Sets the marker for the histogram's bars. + /// Sets the outline of the histogram's bars. + /// Sets the x error of this trace. + /// Sets the y error of this trace. + /// Sets whether and how the cumulative distribution is displayed + /// Sets the style of the hoverlabels of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Histogram + ( + dataEncoded: EncodedTypedArray, + orientation: StyleParam.Orientation, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?HistFunc: StyleParam.HistFunc, + ?HistNorm: StyleParam.HistNorm, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?NBinsX: int, + ?NBinsY: int, + ?BinGroup: string, + ?XBins: Bins, + ?YBins: Bins, + ?MarkerColor: Color, + ?Marker: Marker, + ?Line: Line, + ?XError: Error, + ?YError: Error, + ?Cumulative: Cumulative, + ?HoverLabel: Hoverlabel, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let histChart = + Trace2D.initHistogram ( + Trace2DStyle.Histogram( + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + Orientation = orientation, + ?HistFunc = HistFunc, + ?HistNorm = HistNorm, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?NBinsX = NBinsX, + ?NBinsY = NBinsY, + ?BinGroup = BinGroup, + ?XBins = XBins, + ?YBins = YBins, + ?Marker = Marker, + ?Line = Line, + ?XError = XError, + ?YError = YError, + ?Cumulative = Cumulative, + ?HoverLabel = HoverLabel + ) + ) + |> TraceStyle.Marker(?Color = MarkerColor) + |> TraceStyle.TraceInfo(?Name = Name, ?ShowLegend = ShowLegend) + |> GenericChart.ofTraceObject useDefaults + + match orientation with + | StyleParam.Orientation.Horizontal -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(YEncoded = dataEncoded)) + | StyleParam.Orientation.Vertical -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(XEncoded = dataEncoded)) + + /// + /// Visualizes the distribution of the 2-dimensional input data as 2D Histogram. + /// + ///The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a heatmap. + /// + /// Sets the sample data to be binned on the x axis. + /// Sets the sample data to be binned on the x axis. Use two inner arrays here to plot multicategorial data + /// Sets the sample data to be binned on the y axis. + /// Sets the sample data to be binned on the y axis. Use two inner arrays here to plot multicategorial data + /// Sets the aggregation data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the horizontal gap (in pixels) between bricks. + /// Sets the vertical gap (in pixels) between bricks. + /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. + /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. + /// Sets the binning across the x dimension + /// Sets the binning across the y dimension + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Picks a smoothing algorithm use to smooth `z` data. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Histogram2D + ( + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?Y: seq<#IConvertible>, + ?MultiY: seq>, + ?Z: seq<#seq<#IConvertible>>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?XGap: int, + ?YGap: int, + ?HistFunc: StyleParam.HistFunc, + ?HistNorm: StyleParam.HistNorm, + ?NBinsX: int, + ?NBinsY: int, + ?XBins: Bins, + ?YBins: Bins, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?ZSmooth: StyleParam.SmoothAlg, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + Trace2D.initHistogram2D ( + Trace2DStyle.Histogram2D( + ?X = X, + ?MultiX = MultiX, + ?Y = Y, + ?MultiY = MultiY, + ?Z = Z, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?XGap = XGap, + ?YGap = YGap, + ?HistFunc = HistFunc, + ?HistNorm = HistNorm, + ?NBinsX = NBinsX, + ?NBinsY = NBinsY, + ?XBins = XBins, + ?YBins = YBins, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?ZSmooth = ZSmooth + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Visualizes the distribution of the encoded 2-dimensional input data as a 2D histogram. + /// + /// The sample data from which statistics are computed is set in `xEncoded` and `yEncoded`, and optional encoded aggregation data can be provided through `zEncoded`. + /// + /// Sets the sample data to be binned on the x axis as an encoded typed array. + /// Sets the sample data to be binned on the y axis as an encoded typed array. + /// Sets the aggregation data as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the horizontal gap (in pixels) between bricks. + /// Sets the vertical gap (in pixels) between bricks. + /// Specifies the binning function used for this histogram trace. + /// Specifies the type of normalization used for this histogram trace. + /// Specifies the maximum number of desired bins. + /// Specifies the maximum number of desired bins. + /// Sets the binning across the x dimension + /// Sets the binning across the y dimension + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. + /// Picks a smoothing algorithm use to smooth `z` data. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Histogram2D + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?zEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?XGap: int, + ?YGap: int, + ?HistFunc: StyleParam.HistFunc, + ?HistNorm: StyleParam.HistNorm, + ?NBinsX: int, + ?NBinsY: int, + ?XBins: Bins, + ?YBins: Bins, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?ZSmooth: StyleParam.SmoothAlg, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + Trace2D.initHistogram2D ( + Trace2DStyle.Histogram2D( + XEncoded = xEncoded, + YEncoded = yEncoded, + ?ZEncoded = zEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?XGap = XGap, + ?YGap = YGap, + ?HistFunc = HistFunc, + ?HistNorm = HistNorm, + ?NBinsX = NBinsX, + ?NBinsY = NBinsY, + ?XBins = XBins, + ?YBins = YBins, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?ZSmooth = ZSmooth + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Visualizes the distribution of the 2-dimensional input data as 2D Histogram. + /// + ///The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a heatmap. + /// + /// Sets the sample data to be binned on the x axis. + /// Sets the sample data to be binned on the y axis. + /// Sets the aggregation data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity of the trace. + /// Sets the horizontal gap (in pixels) between bricks. + /// Sets the vertical gap (in pixels) between bricks. + /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. + /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. + /// Sets the binning across the x dimension + /// Sets the binning across the y dimension + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Picks a smoothing algorithm use to smooth `z` data. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Histogram2D + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?Z: seq<#seq<#IConvertible>>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?XGap: int, + ?YGap: int, + ?HistFunc: StyleParam.HistFunc, + ?HistNorm: StyleParam.HistNorm, + ?NBinsX: int, + ?NBinsY: int, + ?XBins: Bins, + ?YBins: Bins, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?ZSmooth: StyleParam.SmoothAlg, + ?UseDefaults: bool + ) = + + Chart.Histogram2D( + X = x, + Y = y, + ?Z = Z, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?XGap = XGap, + ?YGap = YGap, + ?HistFunc = HistFunc, + ?HistNorm = HistNorm, + ?NBinsX = NBinsX, + ?NBinsY = NBinsY, + ?XBins = XBins, + ?YBins = YBins, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?ZSmooth = ZSmooth, + ?UseDefaults = UseDefaults + ) + + + /// + /// Computes a 2D histogram contour plot, also known as a density contour plot, which is a 2-dimensional generalization of a histogram which resembles a contour plot but is computed by grouping a set of points specified by their x and y coordinates into bins, and applying an aggregation function such as count or sum (if z is provided) to compute the value to be used to compute contours. + /// + /// The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a contour plot. + /// + /// Sets the sample data to be binned on the x axis. + /// Sets the sample data to be binned on the x axis. Use two inner arrays here to plot multicategorial data + /// Sets the sample data to be binned on the y axis. + /// Sets the sample data to be binned on the y axis. Use two inner arrays here to plot multicategorial data + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets the aggregation data. + /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. + /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. + /// Set the `xbingroup` and `ybingroup` default prefix For example, setting a `bingroup` of "1" on two histogram2d traces will make them their x-bins and y-bins match separately. + /// Set a group of histogram traces which will have compatible x-bin settings. Using `xbingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup` + /// Sets the binning across the x dimension + /// Set a group of histogram traces which will have compatible y-bin settings. Using `ybingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup` + /// Sets the binning across the y dimension + /// Sets the marker of this trace. + /// Sets the contour line dash style + /// Sets the contour line color + /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. + /// Sets the width of the contour lines + /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). + /// Wether or not to show the contour line + /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. + /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. + /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. + /// Determines whether to label the contour lines with their values. + /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. + /// Sets the starting contour level value. Must be less than `contours.end` + /// Sets the end contour level value. Must be more than `contours.start` + /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of `ncontours`. Has an effect only if `autocontour` is "true" or if `contours.size` is missing. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Histogram2DContour + ( + ?X: seq<#IConvertible>, + ?MultiX: seq>, + ?Y: seq<#IConvertible>, + ?MultiY: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Z: seq<#seq<#IConvertible>>, + ?HistFunc: StyleParam.HistFunc, + ?HistNorm: StyleParam.HistNorm, + ?NBinsX: int, + ?NBinsY: int, + ?BinGroup: string, + ?XBinGroup: string, + ?XBins: Bins, + ?YBinGroup: string, + ?YBins: Bins, + ?Marker: Marker, + ?ContourLinesColor: Color, + ?ContourLinesDash: StyleParam.DrawingStyle, + ?ContourLinesSmoothing: float, + ?ContourLinesWidth: float, + ?ContourLines: Line, + ?ShowContourLines: bool, + ?ContoursColoring: StyleParam.ContourColoring, + ?ContoursOperation: StyleParam.ConstraintOperation, + ?ContoursType: StyleParam.ContourType, + ?ShowContoursLabels: bool, + ?ContoursLabelFont: Font, + ?ContoursStart: float, + ?ContoursEnd: float, + ?Contours: Contours, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?NContours: int, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let showContourLines = + defaultArg ShowContourLines false + + let contourLineWidth = + ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. + + let contours = + Contours + |> Option.defaultValue (TraceObjects.Contours.init ()) + |> TraceObjects.Contours.style ( + ?Coloring = ContoursColoring, + ?Operation = ContoursOperation, + ?Start = ContoursStart, + ?End = ContoursEnd, + ?Type = ContoursType, + ?ShowLabels = ShowContoursLabels, + ?LabelFont = ContoursLabelFont + ) + + let contourLines = + ContourLines + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + Width = contourLineWidth, + ?Color = ContourLinesColor, + ?Dash = ContourLinesDash, + ?Smoothing = ContourLinesSmoothing + ) + + Trace2D.initHistogram2DContour ( + Trace2DStyle.Histogram2DContour( + ?X = X, + ?MultiX = MultiX, + ?Y = Y, + ?MultiY = MultiY, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Z = Z, + ?HistFunc = HistFunc, + ?HistNorm = HistNorm, + ?NBinsX = NBinsX, + ?NBinsY = NBinsY, + ?BinGroup = BinGroup, + ?XBinGroup = XBinGroup, + ?XBins = XBins, + ?YBinGroup = YBinGroup, + ?YBins = YBins, + ?Marker = Marker, + Line = contourLines, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + Contours = contours, + ?NContours = NContours + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Computes a 2D histogram contour plot from encoded input data. + /// + /// Sets the sample data to be binned on the x axis as an encoded typed array. + /// Sets the sample data to be binned on the y axis as an encoded typed array. + /// Sets the aggregation data as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Specifies the binning function used for this histogram trace. + /// Specifies the type of normalization used for this histogram trace. + /// Specifies the maximum number of desired bins. + /// Specifies the maximum number of desired bins. + /// Set the `xbingroup` and `ybingroup` default prefix. + /// Set a group of histogram traces which will have compatible x-bin settings. + /// Sets the binning across the x dimension + /// Set a group of histogram traces which will have compatible y-bin settings. + /// Sets the binning across the y dimension + /// Sets the marker of this trace. + /// Sets the contour line dash style + /// Sets the contour line color + /// Sets the amount of smoothing for the contour lines. + /// Sets the width of the contour lines + /// Sets the contour lines. + /// Wether or not to show the contour line + /// Determines the coloring method showing the contour values. + /// Sets the constraint operation. + /// Sets the contour representation type. + /// Determines whether to label the contour lines with their values. + /// Sets the font used for labeling the contour levels. + /// Sets the starting contour level value. + /// Sets the end contour level value. + /// Sets the styles of the contours. + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. + /// Sets the maximum number of contour levels. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Histogram2DContour + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?zEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?HistFunc: StyleParam.HistFunc, + ?HistNorm: StyleParam.HistNorm, + ?NBinsX: int, + ?NBinsY: int, + ?BinGroup: string, + ?XBinGroup: string, + ?XBins: Bins, + ?YBinGroup: string, + ?YBins: Bins, + ?Marker: Marker, + ?ContourLinesColor: Color, + ?ContourLinesDash: StyleParam.DrawingStyle, + ?ContourLinesSmoothing: float, + ?ContourLinesWidth: float, + ?ContourLines: Line, + ?ShowContourLines: bool, + ?ContoursColoring: StyleParam.ContourColoring, + ?ContoursOperation: StyleParam.ConstraintOperation, + ?ContoursType: StyleParam.ContourType, + ?ShowContoursLabels: bool, + ?ContoursLabelFont: Font, + ?ContoursStart: float, + ?ContoursEnd: float, + ?Contours: Contours, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?NContours: int, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let showContourLines = + defaultArg ShowContourLines false + + let contourLineWidth = + ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. + + let contours = + Contours + |> Option.defaultValue (TraceObjects.Contours.init ()) + |> TraceObjects.Contours.style ( + ?Coloring = ContoursColoring, + ?Operation = ContoursOperation, + ?Start = ContoursStart, + ?End = ContoursEnd, + ?Type = ContoursType, + ?ShowLabels = ShowContoursLabels, + ?LabelFont = ContoursLabelFont + ) + + let contourLines = + ContourLines + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + Width = contourLineWidth, + ?Color = ContourLinesColor, + ?Dash = ContourLinesDash, + ?Smoothing = ContourLinesSmoothing + ) + + Trace2D.initHistogram2DContour ( + Trace2DStyle.Histogram2DContour( + XEncoded = xEncoded, + YEncoded = yEncoded, + ?ZEncoded = zEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?HistFunc = HistFunc, + ?HistNorm = HistNorm, + ?NBinsX = NBinsX, + ?NBinsY = NBinsY, + ?BinGroup = BinGroup, + ?XBinGroup = XBinGroup, + ?XBins = XBins, + ?YBinGroup = YBinGroup, + ?YBins = YBins, + ?Marker = Marker, + Line = contourLines, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + Contours = contours, + ?NContours = NContours + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Computes a 2D histogram contour plot, also known as a density contour plot, which is a 2-dimensional generalization of a histogram which resembles a contour plot but is computed by grouping a set of points specified by their x and y coordinates into bins, and applying an aggregation function such as count or sum (if z is provided) to compute the value to be used to compute contours. + /// + /// The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a contour plot. + /// + /// Sets the sample data to be binned on the x axis. + /// Sets the sample data to be binned on the y axis. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets the aggregation data. + /// Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively. + /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. + /// Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. + /// Set the `xbingroup` and `ybingroup` default prefix For example, setting a `bingroup` of "1" on two histogram2d traces will make them their x-bins and y-bins match separately. + /// Set a group of histogram traces which will have compatible x-bin settings. Using `xbingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup` + /// Sets the binning across the x dimension + /// Set a group of histogram traces which will have compatible y-bin settings. Using `ybingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup` + /// Sets the binning across the y dimension + /// Sets the marker of this trace. + /// Sets the contour line dash style + /// Sets the contour line color + /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. + /// Sets the width of the contour lines + /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). + /// Wether or not to show the contour line + /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. + /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. + /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. + /// Determines whether to label the contour lines with their values. + /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. + /// Sets the starting contour level value. Must be less than `contours.end` + /// Sets the end contour level value. Must be more than `contours.start` + /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). + /// Sets the styles of the colorbar for this trace. + /// Sets the colorscale for this trace. + /// Whether or not to show the colorscale/colorbar + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of `ncontours`. Has an effect only if `autocontour` is "true" or if `contours.size` is missing. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Histogram2DContour + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Z: seq<#seq<#IConvertible>>, + ?HistFunc: StyleParam.HistFunc, + ?HistNorm: StyleParam.HistNorm, + ?NBinsX: int, + ?NBinsY: int, + ?BinGroup: string, + ?XBinGroup: string, + ?XBins: Bins, + ?YBinGroup: string, + ?YBins: Bins, + ?Marker: Marker, + ?ContourLinesColor: Color, + ?ContourLinesDash: StyleParam.DrawingStyle, + ?ContourLinesSmoothing: float, + ?ContourLinesWidth: float, + ?ContourLines: Line, + ?ShowContourLines: bool, + ?ContoursColoring: StyleParam.ContourColoring, + ?ContoursOperation: StyleParam.ConstraintOperation, + ?ContoursType: StyleParam.ContourType, + ?ShowContoursLabels: bool, + ?ContoursLabelFont: Font, + ?ContoursStart: float, + ?ContoursEnd: float, + ?Contours: Contours, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?NContours: int, + ?UseDefaults: bool + ) = + Chart.Histogram2DContour( + X = x, + Y = y, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Z = Z, + ?HistFunc = HistFunc, + ?HistNorm = HistNorm, + ?NBinsX = NBinsX, + ?NBinsY = NBinsY, + ?BinGroup = BinGroup, + ?XBinGroup = XBinGroup, + ?XBins = XBins, + ?YBinGroup = YBinGroup, + ?YBins = YBins, + ?Marker = Marker, + ?ContourLinesColor = ContourLinesColor, + ?ContourLinesDash = ContourLinesDash, + ?ContourLinesSmoothing = ContourLinesSmoothing, + ?ContourLinesWidth = ContourLinesWidth, + ?ContourLines = ContourLines, + ?ShowContourLines= ShowContourLines, + ?ContoursColoring = ContoursColoring, + ?ContoursOperation = ContoursOperation, + ?ContoursType = ContoursType, + ?ShowContoursLabels = ShowContoursLabels, + ?ContoursLabelFont = ContoursLabelFont, + ?ContoursStart = ContoursStart, + ?ContoursEnd = ContoursEnd, + ?Contours = Contours, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?NContours = NContours, + ?UseDefaults = UseDefaults + ) + diff --git a/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Scatter.fs b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Scatter.fs new file mode 100644 index 00000000..56886dbf --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Scatter.fs @@ -0,0 +1,2305 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +open System.Runtime.CompilerServices + +open System.Runtime.InteropServices + +[] +module Chart2D_Scatter = + [] + type Chart = + [] + static member internal renderScatterTrace (useDefaults: bool) (useWebGL: bool) (style: Trace2D -> Trace2D) = + if useWebGL then + Trace2D.initScatterGL style |> GenericChart.ofTraceObject useDefaults + else + Trace2D.initScatter style |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a Scatter plot. + /// + /// Scatter charts are the basis of Point, Line, and Bubble Charts, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble + /// + /// Sets the x coordinates of the plotted data. + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the x coordinates of the plotted data. Use two inner arrays here to plot multicategorial data + /// Sets the y coordinates of the plotted data. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Sets the x coordinates of the plotted data. Use two inner arrays here to plot multicategorial data + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the pattern within the marker. + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Scatter + ( + ?X: seq<#IConvertible>, + ?XEncoded: EncodedTypedArray, + ?MultiX: seq>, + ?Y: seq<#IConvertible>, + ?YEncoded: EncodedTypedArray, + ?MultiY: seq>, + ?Mode: StyleParam.Mode, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?Fill: StyleParam.Fill, + ?FillColor: Color, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity + ) + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Dash = LineDash, + ?Colorscale = LineColorScale, + ?Width = LineWidth + ) + + let style = + Trace2DStyle.Scatter( + ?X = X, + ?XEncoded = XEncoded, + ?MultiX = MultiX, + ?Y = Y, + ?YEncoded = YEncoded, + ?MultiY = MultiY, + ?Mode = Mode, + Marker = marker, + Line = line, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?Fill = Fill, + ?FillColor = FillColor, + ?FillPattern = FillPattern + ) + + let useWebGL = defaultArg UseWebGL false + + Chart.renderScatterTrace useDefaults useWebGL style + + /// + /// Creates a Scatter plot from encoded x and y coordinates. + /// + /// Scatter charts are the basis of Point, Line, and Bubble Charts, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble + /// + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the pattern within the marker. + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Scatter + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + mode: StyleParam.Mode, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?Fill: StyleParam.Fill, + ?FillColor: Color, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + Chart.Scatter( + XEncoded = xEncoded, + YEncoded = yEncoded, + Mode = mode, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?Fill = Fill, + ?FillColor = FillColor, + ?FillPattern = FillPattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a Scatter plot. + /// + /// Scatter charts are the basis of Point, Line, and Bubble Charts, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble + /// + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the pattern within the marker. + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Scatter + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + mode: StyleParam.Mode, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?Fill: StyleParam.Fill, + ?FillColor: Color, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + Chart.Scatter( + X = x, + Y = y, + Mode = mode, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?Fill = Fill, + ?FillColor = FillColor, + ?FillPattern = FillPattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a Scatter chart. Scatter charts are the basis of Point, Line, and Bubble Charts in Plotly, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble + /// + /// Sets the x and y coordinates of the plotted data. + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the pattern within the marker. + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Scatter + ( + xy: seq<#IConvertible * #IConvertible>, + mode: StyleParam.Mode, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?Fill: StyleParam.Fill, + ?FillColor: Color, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let x, y = Seq.unzip xy + + Chart.Scatter( + x = x, + y = y, + mode = mode, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?Fill = Fill, + ?FillColor = FillColor, + ?FillPattern = FillPattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a Point chart, which uses Points in a 2D space to visualize data. + /// + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Point + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + // if text position or font is set, then show labels (not only when hovering) + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + Chart.Scatter( + X = x, + Y = y, + Mode = changeMode StyleParam.Mode.Markers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a Point chart from encoded x and y coordinates. + /// + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Point + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + Chart.Scatter( + XEncoded = xEncoded, + YEncoded = yEncoded, + Mode = changeMode StyleParam.Mode.Markers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + + /// Creates a Point chart, which uses Points in a 2D space to visualize data. + /// Sets the x and y coordinates of the plotted data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Point + ( + xy: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + let x, y = Seq.unzip xy + + Chart.Point( + x = x, + y = y, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + + /// Creates a Line chart, which uses a Line plotted between the given datums in a 2D space to visualize typically an evolution of Y depending on X. + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Whether to show markers for the individual data points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the pattern within the marker. + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Line + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?Fill: StyleParam.Fill, + ?FillColor: Color, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + // if text position or font is set than show labels (not only when hovering) + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + Chart.Scatter( + X = x, + Y = y, + Mode = changeMode StyleParam.Mode.Lines, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?Fill = Fill, + ?FillColor = FillColor, + ?FillPattern = FillPattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + + ) + + /// Creates a Line chart from encoded x and y coordinates. + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Whether to show markers for the individual data points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces linked to the same position axis or matching axes to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the pattern within the marker. + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Line + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?Fill: StyleParam.Fill, + ?FillColor: Color, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + Chart.Scatter( + XEncoded = xEncoded, + YEncoded = yEncoded, + Mode = changeMode StyleParam.Mode.Lines, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?Fill = Fill, + ?FillColor = FillColor, + ?FillPattern = FillPattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + + ) + + + + /// Creates a Line chart, which uses a Line plotted between the given datums in a 2D space to visualize typically an evolution of Y depending on X. + /// Sets the x,y coordinates of the plotted data. + /// Whether to show markers for the individual data points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the pattern within the marker. + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Line + ( + xy: seq<#IConvertible * #IConvertible>, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?Fill: StyleParam.Fill, + ?FillColor: Color, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + let x, y = Seq.unzip xy + + Chart.Line( + x = x, + y = y, + ?ShowMarkers = ShowMarkers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?Fill = Fill, + ?FillColor = FillColor, + ?FillPattern = FillPattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + ) + + + /// Creates a Spline chart. A spline chart is a line chart in which data points are connected by smoothed curves: this modification is aimed to improve the design of a chart. + /// Very similar to Line Plots, spline charts are typically used to visualize an evolution of Y depending on X. + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Whether to show markers for the individual data points + /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the pattern within the marker. + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Spline + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?ShowMarkers: bool, + ?Smoothing: float, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?Fill: StyleParam.Fill, + ?FillColor: Color, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + // if text position set then show labels (not only when hovering) + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity + ) + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Dash = LineDash, + ?Colorscale = LineColorScale, + ?Width = LineWidth, + Shape = StyleParam.Shape.Spline, + ?Smoothing = Smoothing + + ) + + let style = + Trace2DStyle.Scatter( + X = x, + Y = y, + Mode = changeMode StyleParam.Mode.Lines, + Marker = marker, + Line = line, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?Fill = Fill, + ?FillColor = FillColor, + ?FillPattern = FillPattern + ) + + let useWebGL = defaultArg UseWebGL false + + Chart.renderScatterTrace useDefaults useWebGL style + + /// + /// Creates a Spline chart from encoded x and y coordinates. + /// + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Whether to show markers for the individual data points + /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the pattern within the marker. + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Spline + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?ShowMarkers: bool, + ?Smoothing: float, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?Fill: StyleParam.Fill, + ?FillColor: Color, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity + ) + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Dash = LineDash, + ?Colorscale = LineColorScale, + ?Width = LineWidth, + Shape = StyleParam.Shape.Spline, + ?Smoothing = Smoothing + + ) + + let style = + Trace2DStyle.Scatter( + XEncoded = xEncoded, + YEncoded = yEncoded, + Mode = changeMode StyleParam.Mode.Lines, + Marker = marker, + Line = line, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?Fill = Fill, + ?FillColor = FillColor, + ?FillPattern = FillPattern + ) + + let useWebGL = defaultArg UseWebGL false + + Chart.renderScatterTrace useDefaults useWebGL style + + + /// + /// Creates a Spline chart. A spline chart is a line chart in which data points are connected by smoothed curves: this modification is aimed to improve the design of a chart. + /// Very similar to Line Plots, spline charts are typically used to visualize an evolution of Y depending on X. + /// + /// Sets the x,y coordinates of the plotted data. + /// Whether to show markers for the individual data points + /// Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3 + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order. + /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. + /// Sets the pattern within the marker. + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Spline + ( + xy: seq<#IConvertible * #IConvertible>, + ?ShowMarkers: bool, + ?Smoothing: float, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?Fill: StyleParam.Fill, + ?FillColor: Color, + ?FillPattern: Pattern, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + let x, y = Seq.unzip xy + + Chart.Spline( + x = x, + y = y, + ?ShowMarkers = ShowMarkers, + ?Smoothing = Smoothing, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?Fill = Fill, + ?FillColor = FillColor, + ?FillPattern = FillPattern, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + + ) + + + /// Creates a bubble chart. A bubble chart is a variation of the Point chart, where the data points get an additional scale by being rendered as bubbles of different sizes. + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Sets the bubble size of the plotted data + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Bubble + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + sizes: seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + // if text position or font is set than show labels (not only when hovering) + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity, + MultiSize = sizes + ) + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Dash = LineDash, + ?Colorscale = LineColorScale, + ?Width = LineWidth + ) + + let style = + Trace2DStyle.Scatter( + X = x, + Y = y, + Mode = changeMode StyleParam.Mode.Markers, + Marker = marker, + Line = line, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm + ) + + let useWebGL = defaultArg UseWebGL false + + Chart.renderScatterTrace useDefaults useWebGL style + + /// Creates a bubble chart from encoded x and y coordinates. + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Sets the bubble sizes of the plotted data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Bubble + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + sizes: seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity, + MultiSize = sizes + ) + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Dash = LineDash, + ?Colorscale = LineColorScale, + ?Width = LineWidth + ) + + let style = + Trace2DStyle.Scatter( + XEncoded = xEncoded, + YEncoded = yEncoded, + Mode = changeMode StyleParam.Mode.Markers, + Marker = marker, + Line = line, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm + ) + + let useWebGL = defaultArg UseWebGL false + + Chart.renderScatterTrace useDefaults useWebGL style + + /// Creates a bubble chart. A bubble chart is a variation of the Point chart, where the data points get an additional scale by being rendered as bubbles of different sizes. + /// Sets the x coordinates, y coordinates, and bubble sizes of the plotted data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// 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. + /// 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. + /// Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order + /// Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used. + /// Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used + /// If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Bubble + ( + xysizes: seq<#IConvertible * #IConvertible * int>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?AlignmentGroup: string, + ?OffsetGroup: string, + ?StackGroup: string, + ?Orientation: StyleParam.Orientation, + ?GroupNorm: StyleParam.GroupNorm, + ?UseWebGL: bool, + ?UseDefaults: bool + ) = + let x, y, sizes = Seq.unzip3 xysizes + + Chart.Bubble( + x = x, + y = y, + sizes = sizes, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?AlignmentGroup = AlignmentGroup, + ?OffsetGroup = OffsetGroup, + ?StackGroup = StackGroup, + ?Orientation = Orientation, + ?GroupNorm = GroupNorm, + ?UseWebGL = UseWebGL, + ?UseDefaults = UseDefaults + + ) + + /// + /// Displays a range of data by plotting three Y values per data point (upper, mid, lower). + /// + /// The mid Y value usually resembles some kind of central tendency and the upper/lower Y values some kind of spread. + /// + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data for the mid Y value. + /// Sets the y coordinates of the plotted data for the upper Y value. + /// Sets the y coordinates of the plotted data for the lower Y value. + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name of the mid Y values. The trace name appear as the legend item and on hover + /// Sets the name of the legendgroup for the three traces of this plot. + /// Determines whether or not an To show markers for each datum. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum for the mid Y values. + /// Sets individual text for each datum for the mid Y values. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker for the mid Y values. + /// Sets the colorscale of the marker for the mid Y values. + /// Sets the outline of the marker for the mid Y values. + /// Sets the marker symbol for each datum for the mid Y values. + /// Sets the marker symbol for each individual datum for the mid Y values. + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the mid Y values. + /// Sets the color of the line for the mid Y values. + /// Sets the colorscale of the line for the mid Y values. + /// Sets the width of the line for the mid Y values. + /// sets the drawing style of the line for the mid Y values. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the mid Y values. + /// Sets the color of the range between upper and lower Y values. + /// Sets the pattern of the range between upper and lower Y values. + /// Sets a text associated with each datum for the upper Y values. + /// Sets individual text for each datum for the upper Y values. + /// Sets a text associated with each datum for the lower Y values. + /// Sets individual text for each datum for the lower Y values. + /// Sets the text font for all Text items + /// Sets the name of the lower Y value trace. + /// Sets the line for the lower Y values. + /// Sets the marker for the lower Y values. + /// Sets the name of the uper Y value trace. + /// Sets the line for the upper Y values. + /// Sets the marker for the upper Y values. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Range + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + upper: seq<#IConvertible>, + lower: seq<#IConvertible>, + mode: StyleParam.Mode, + ?Name: string, + ?GroupName: string, + ?ShowMarkers: bool, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?UpperMarker: Marker, + ?LowerMarker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?UpperLine: Line, + ?LowerLine: Line, + ?RangeColor: Color, + ?RangePattern: Pattern, + ?UpperText: #IConvertible, + ?MultiUpperText: seq<#IConvertible>, + ?LowerText: #IConvertible, + ?MultiLowerText: seq<#IConvertible>, + ?TextFont: Font, + ?LowerName: string, + ?UpperName: string, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let upperName = defaultArg UpperName "upper" + let lowerName = defaultArg LowerName "lower" + + // if text position or font is set than show labels (not only when hovering) + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || TextFont.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + let trace = + Chart.Scatter( + X = x, + Y = y, + Mode = changeMode mode, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line + ) + |> GenericChart.mapTrace ( + Trace2DStyle.Scatter( + LegendGroup = (defaultArg GroupName "Range"), + LegendGroupTitle = (Title.init (Text = (defaultArg GroupName "Range"))) + ) + ) + + let lower = + Trace2D.initScatter ( + Trace2DStyle.Scatter( + X = x, + Y = lower, + Mode = changeMode mode, + ?FillColor = RangeColor, + ?Name = Some lowerName, + ShowLegend = (defaultArg ShowLegend true), + ?Text = LowerText, + ?MultiText = MultiLowerText, + ?TextPosition = TextPosition, + ?TextFont = TextFont, + ?Marker = LowerMarker, + ?Line = LowerLine, + LegendGroup = (defaultArg GroupName "Range") + ) + ) + |> TraceStyle.Marker( + Color = + if RangeColor.IsSome then + RangeColor.Value + else + (Plotly.NET.Color.fromString "rgba(0,0,0,0.5)") + ) + + let upper = + Trace2D.initScatter ( + Trace2DStyle.Scatter( + X = x, + Y = upper, + Mode = changeMode mode, + Fill = StyleParam.Fill.ToNext_y, + ?FillColor = RangeColor, + ?FillPattern = RangePattern, + ?Name = Some upperName, + ShowLegend = (defaultArg ShowLegend true), + ?Text = UpperText, + ?MultiText = MultiUpperText, + ?TextPosition = TextPosition, + ?TextFont = TextFont, + ?Marker = UpperMarker, + ?Line = UpperLine, + LegendGroup = (defaultArg GroupName "Range") + ) + ) + |> TraceStyle.Marker( + Color = + if RangeColor.IsSome then + RangeColor.Value + else + (Plotly.NET.Color.fromString "rgba(0,0,0,0.5)") + ) + + GenericChart.ofTraceObjects + useDefaults + [ + lower + upper + yield! (GenericChart.getTraces trace) + ] + + /// + /// Displays a range of data from encoded x and y coordinates by plotting three encoded Y values per data point (upper, mid, lower). + /// + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data for the mid Y values as an encoded typed array. + /// Sets the y coordinates of the plotted data for the upper Y value as an encoded typed array. + /// Sets the y coordinates of the plotted data for the lower Y value as an encoded typed array. + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the name of the legendgroup for the three traces of this plot. + /// Determines whether or not an To show markers for each datum. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum for the mid Y values. + /// Sets individual text for each datum for the mid Y values. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker for the mid Y values. + /// Sets the colorscale of the marker for the mid Y values. + /// Sets the outline of the marker for the mid Y values. + /// Sets the marker symbol for each datum for the mid Y values. + /// Sets the marker symbol for each individual datum for the mid Y values. + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the mid Y values. + /// Sets the color of the line for the mid Y values. + /// Sets the colorscale of the line for the mid Y values. + /// Sets the width of the line for the mid Y values. + /// sets the drawing style of the line for the mid Y values. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the mid Y values. + /// Sets the color of the range between upper and lower Y values. + /// Sets the pattern of the range between upper and lower Y values. + /// Sets a text associated with each datum for the upper Y values. + /// Sets individual text for each datum for the upper Y values. + /// Sets a text associated with each datum for the lower Y values. + /// Sets individual text for each datum for the lower Y values. + /// Sets the text font for all Text items + /// Sets the name of the lower Y value trace. + /// Sets the line for the lower Y values. + /// Sets the marker for the lower Y values. + /// Sets the name of the uper Y value trace. + /// Sets the line for the upper Y values. + /// Sets the marker for the upper Y values. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Range + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + upperEncoded: EncodedTypedArray, + lowerEncoded: EncodedTypedArray, + mode: StyleParam.Mode, + ?Name: string, + ?GroupName: string, + ?ShowMarkers: bool, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?UpperMarker: Marker, + ?LowerMarker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?UpperLine: Line, + ?LowerLine: Line, + ?RangeColor: Color, + ?RangePattern: Pattern, + ?UpperText: #IConvertible, + ?MultiUpperText: seq<#IConvertible>, + ?LowerText: #IConvertible, + ?MultiLowerText: seq<#IConvertible>, + ?TextFont: Font, + ?LowerName: string, + ?UpperName: string, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let upperName = defaultArg UpperName "upper" + let lowerName = defaultArg LowerName "lower" + + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || TextFont.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + let trace = + Chart.Scatter( + XEncoded = xEncoded, + YEncoded = yEncoded, + Mode = changeMode mode, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line + ) + |> GenericChart.mapTrace ( + Trace2DStyle.Scatter( + LegendGroup = (defaultArg GroupName "Range"), + LegendGroupTitle = (Title.init (Text = (defaultArg GroupName "Range"))) + ) + ) + + let lower = + Trace2D.initScatter ( + Trace2DStyle.Scatter( + XEncoded = xEncoded, + YEncoded = lowerEncoded, + Mode = changeMode mode, + ?FillColor = RangeColor, + ?Name = Some lowerName, + ShowLegend = (defaultArg ShowLegend true), + ?Text = LowerText, + ?MultiText = MultiLowerText, + ?TextPosition = TextPosition, + ?TextFont = TextFont, + ?Marker = LowerMarker, + ?Line = LowerLine, + LegendGroup = (defaultArg GroupName "Range") + ) + ) + |> TraceStyle.Marker( + Color = + if RangeColor.IsSome then + RangeColor.Value + else + (Plotly.NET.Color.fromString "rgba(0,0,0,0.5)") + ) + + let upper = + Trace2D.initScatter ( + Trace2DStyle.Scatter( + XEncoded = xEncoded, + YEncoded = upperEncoded, + Mode = changeMode mode, + Fill = StyleParam.Fill.ToNext_y, + ?FillColor = RangeColor, + ?FillPattern = RangePattern, + ?Name = Some upperName, + ShowLegend = (defaultArg ShowLegend true), + ?Text = UpperText, + ?MultiText = MultiUpperText, + ?TextPosition = TextPosition, + ?TextFont = TextFont, + ?Marker = UpperMarker, + ?Line = UpperLine, + LegendGroup = (defaultArg GroupName "Range") + ) + ) + |> TraceStyle.Marker( + Color = + if RangeColor.IsSome then + RangeColor.Value + else + (Plotly.NET.Color.fromString "rgba(0,0,0,0.5)") + ) + + GenericChart.ofTraceObjects + useDefaults + [ + lower + upper + yield! (GenericChart.getTraces trace) + ] + + /// + /// Displays a range of data by plotting three Y values per data point (upper, mid, lower). + /// + /// The mid Y value usually resembles some kind of central tendency and the upper/lower Y values some kind of spread. + /// + /// Sets the x and y coordinates of the plotted data (x is used for all y data, the y coordinates are those of the mod values). + /// Sets the y coordinates of the plotted data for the upper Y value. + /// Sets the y coordinates of the plotted data for the lower Y value. + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the name of the legendgroup for the three traces of this plot. + /// Determines whether or not an To show markers for each datum. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum for the mid Y values. + /// Sets individual text for each datum for the mid Y values. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker for the mid Y values. + /// Sets the colorscale of the marker for the mid Y values. + /// Sets the outline of the marker for the mid Y values. + /// Sets the marker symbol for each datum for the mid Y values. + /// Sets the marker symbol for each individual datum for the mid Y values. + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the mid Y values. + /// Sets the color of the line for the mid Y values. + /// Sets the colorscale of the line for the mid Y values. + /// Sets the width of the line for the mid Y values. + /// sets the drawing style of the line for the mid Y values. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the mid Y values. + /// Sets the color of the range between upper and lower Y values. + /// Sets the pattern of the range between upper and lower Y values. + /// Sets a text associated with each datum for the upper Y values. + /// Sets individual text for each datum for the upper Y values. + /// Sets a text associated with each datum for the lower Y values. + /// Sets individual text for each datum for the lower Y values. + /// Sets the text font for all Text items + /// Sets the name of the lower Y value trace. + /// Sets the line for the lower Y values. + /// Sets the marker for the lower Y values. + /// Sets the name of the uper Y value trace. + /// Sets the line for the upper Y values. + /// Sets the marker for the upper Y values. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Range + ( + xy: seq<#IConvertible * #IConvertible>, + upper: seq<#IConvertible>, + lower: seq<#IConvertible>, + mode: StyleParam.Mode, + ?Name: string, + ?GroupName: string, + ?ShowMarkers: bool, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?UpperMarker: Marker, + ?LowerMarker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?UpperLine: Line, + ?LowerLine: Line, + ?RangeColor: Color, + ?RangePattern: Pattern, + ?UpperText: #IConvertible, + ?MultiUpperText: seq<#IConvertible>, + ?LowerText: #IConvertible, + ?MultiLowerText: seq<#IConvertible>, + ?TextFont: Font, + ?LowerName: string, + ?UpperName: string, + ?UseDefaults: bool + ) = + let x, y = Seq.unzip xy + + Chart.Range( + x = x, + y = y, + upper = upper, + lower = lower, + mode = mode, + ?Name = Name, + ?GroupName = GroupName, + ?ShowMarkers = ShowMarkers, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?UpperMarker = UpperMarker, + ?LowerMarker = LowerMarker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?UpperLine = UpperLine, + ?LowerLine = LowerLine, + ?RangeColor = RangeColor, + ?RangePattern = RangePattern, + ?UpperText = UpperText, + ?MultiUpperText = MultiUpperText, + ?LowerText = LowerText, + ?MultiLowerText = MultiLowerText, + ?TextFont = TextFont, + ?LowerName = LowerName, + ?UpperName = UpperName, + ?UseDefaults = UseDefaults + ) + diff --git a/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Splom.fs b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Splom.fs new file mode 100644 index 00000000..44b7a960 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Splom.fs @@ -0,0 +1,478 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +open System.Runtime.CompilerServices + +open System.Runtime.InteropServices + +[] +module Chart2D_Splom = + [] + type Chart = + /// + /// Creates a scatter plot matrix (SPLOM) from multiple input dimensions. + /// + /// Each splom `dimensions` items correspond to a generated axis. Values for each of those dimensions are set in `dimensions[i].values`. Splom traces support all `scattergl` marker style attributes. Specify `layout.grid` attributes and/or layout x-axis and y-axis attributes for more control over the axis positioning and style. + /// + /// Sets the dimensions of the scatter plot matrix, where each item corresponds to a generated axis. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the marker. + /// Sets the colorscale of the marker. Use `Color.fromColorScaleValues` to map marker colors to a colorscale. + /// Sets the outline of the marker + /// Sets the symbol of all marker + /// Sets the symbol of each individual marker + /// Sets the markers (use this for more finegrained control than the other marker-associated arguments). + /// Whether or not to show the matrix diagional + /// Sets the styles applied to the scatter plot matrix diagonal + /// Determines whether or not subplots on the lower half from the diagonal are displayed. + /// Determines whether or not subplots on the upper half from the diagonal are displayed. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Splom + ( + dimensions: seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?ShowDiagonal: bool, + ?Diagonal: SplomDiagonal, + ?ShowLowerHalf: bool, + ?ShowUpperHalf: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale + ) + + let diagonal = + Diagonal + |> Option.defaultValue (TraceObjects.SplomDiagonal.init ()) + |> TraceObjects.SplomDiagonal.style (?Visible = ShowDiagonal) + + Trace2D.initSplom ( + Trace2DStyle.Splom( + Dimensions = dimensions, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + Marker = marker, + Diagonal = diagonal, + ?ShowLowerHalf = ShowLowerHalf, + ?ShowUpperHalf = ShowUpperHalf + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a scatter plot matrix (SPLOM) from multiple input dimensions. + /// + /// Each splom `dimensions` items correspond to a generated axis. Values for each of those dimensions are set in `dimensions[i].values`. Splom traces support all `scattergl` marker style attributes. Specify `layout.grid` attributes and/or layout x-axis and y-axis attributes for more control over the axis positioning and style. + /// + /// Sets the dimensions of the scatter plot matrix as (dimensionKey,dimensionValues) pairs, where each such pair corresponds to a generated axis. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the marker. + /// Sets the colorscale of the marker. Use `Color.fromColorScaleValues` to map marker colors to a colorscale. + /// Sets the outline of the marker + /// Sets the symbol of all marker + /// Sets the symbol of each individual marker + /// Sets the markers (use this for more finegrained control than the other marker-associated arguments). + /// Whether or not to show the matrix diagional + /// Sets the styles applied to the scatter plot matrix diagonal + /// Determines whether or not subplots on the lower half from the diagonal are displayed. + /// Determines whether or not subplots on the upper half from the diagonal are displayed. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Splom + ( + keyValues: seq>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?ShowDiagonal: bool, + ?Diagonal: SplomDiagonal, + ?ShowLowerHalf: bool, + ?ShowUpperHalf: bool, + ?UseDefaults: bool + ) = + + let dims = + keyValues |> Seq.map (fun (key, vals) -> Dimension.initSplom (Label = key, Values = vals)) + + Chart.Splom( + dims, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?ShowDiagonal = ShowDiagonal, + ?Diagonal = Diagonal, + ?ShowLowerHalf = ShowLowerHalf, + ?ShowUpperHalf = ShowUpperHalf, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a scatter plot matrix (SPLOM) from multiple encoded input dimensions. + /// + /// Each splom dimension is provided as a pair of a dimension label and an encoded typed array containing that dimension's values. + /// Splom traces support all `scattergl` marker style attributes. Specify `layout.grid` attributes and/or layout x-axis and y-axis attributes for more control over the axis positioning and style. + /// + /// Sets the dimensions of the scatter plot matrix as (dimensionKey, encodedDimensionValues) pairs, where each such pair corresponds to a generated axis. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the Opacity otf the trace. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the marker. + /// Sets the colorscale of the marker. Use `Color.fromColorScaleValues` to map marker colors to a colorscale. + /// Sets the outline of the marker + /// Sets the symbol of all marker + /// Sets the symbol of each individual marker + /// Sets the markers (use this for more finegrained control than the other marker-associated arguments). + /// Whether or not to show the matrix diagional + /// Sets the styles applied to the scatter plot matrix diagonal + /// Determines whether or not subplots on the lower half from the diagonal are displayed. + /// Determines whether or not subplots on the upper half from the diagonal are displayed. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Splom + ( + keyValuesEncoded: seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?ShowDiagonal: bool, + ?Diagonal: SplomDiagonal, + ?ShowLowerHalf: bool, + ?ShowUpperHalf: bool, + ?UseDefaults: bool + ) = + + let dims = + keyValuesEncoded + |> Seq.map (fun (key, encodedVals) -> Dimension.initSplom (Label = key, ValuesEncoded = encodedVals)) + + Chart.Splom( + dims, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?ShowDiagonal = ShowDiagonal, + ?Diagonal = Diagonal, + ?ShowLowerHalf = ShowLowerHalf, + ?ShowUpperHalf = ShowUpperHalf, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a point density plot - a combination of a Scatter plot and Histogram2DContour. + /// + /// Additionally to plotting the (x,y) data as points on a 2D plane, a density contour plot is computed by grouping a set of points specified by their x and y coordinates into bins, and applying a count aggregation function to compute the value to be used to compute contours. + /// The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case). The resulting distribution is visualized as a contour plot. + /// + /// + /// Sets the x coordinates of the plotted data as well as the sample data to be binned on the x axis. + /// Sets the y coordinates of the plotted data as well as the sample data to be binned on the y axis. + /// Sets the opacity of the point trace. + /// Sets the marker color of the point trace. + /// Sets the marker symbol of the point trace. + /// Sets the marker size of the point trace. + /// Sets the contour line dash style + /// Sets the contour line color + /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. + /// Sets the width of the contour lines + /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). + /// Wether or not to show the contour line + /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. + /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. + /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. + /// Determines whether to label the contour lines with their values. + /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. + /// Sets the starting contour level value. Must be less than `contours.end` + /// Sets the end contour level value. Must be more than `contours.start` + /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). + /// Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of `ncontours`. Has an effect only if `autocontour` is "true" or if `contours.size` is missing. + /// Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1). + /// Sets the opacity of the histogram2dcontour trace. + /// Sets the color bar. + /// Sets the colorscale of the histogram2dcontour trace. + /// whether or not to show the colorbar + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member PointDensity + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + ?PointOpacity: float, + ?PointMarkerColor: Color, + ?PointMarkerSymbol: StyleParam.MarkerSymbol, + ?PointMarkerSize: int, + ?ContourLinesColor: Color, + ?ContourLinesDash: StyleParam.DrawingStyle, + ?ContourLinesSmoothing: float, + ?ContourLinesWidth: float, + ?ContourLines: Line, + ?ShowContourLines: bool, + ?ContoursColoring: StyleParam.ContourColoring, + ?ContoursOperation: StyleParam.ConstraintOperation, + ?ContoursType: StyleParam.ContourType, + ?ShowContoursLabels: bool, + ?ContoursLabelFont: Font, + ?ContoursStart: float, + ?ContoursEnd: float, + ?Contours: Contours, + ?NContours: int, + ?HistNorm: StyleParam.HistNorm, + ?ContourOpacity: float, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?UseDefaults: bool + ) = + + let showContourLines = + defaultArg ShowContourLines false + + let pointOpacity = + defaultArg PointOpacity 0.3 + + let contoursColoring = + defaultArg ContoursColoring StyleParam.ContourColoring.Fill + + let useDefaults = + defaultArg UseDefaults true + + let contourLinesWidth = + ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. + + let marker = + Marker.init (?Color = PointMarkerColor, ?Symbol = PointMarkerSymbol, ?Size = PointMarkerSize) + + let pointTrace = + Trace2D.initScatter ( + Trace2DStyle.Scatter( + X = x, + Y = y, + Mode = StyleParam.Mode.Markers, + Marker = marker, + Opacity = pointOpacity + ) + ) + + let contourLines = + ContourLines + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + Width = contourLinesWidth, + ?Color = ContourLinesColor, + ?Dash = ContourLinesDash, + ?Smoothing = ContourLinesSmoothing + ) + + let contours = + Contours + |> Option.defaultValue (TraceObjects.Contours.init ()) + |> TraceObjects.Contours.style ( + Coloring = contoursColoring, + ?Operation = ContoursOperation, + ?Start = ContoursStart, + ?End = ContoursEnd, + ?Type = ContoursType, + ?ShowLabels = ShowContoursLabels, + ?LabelFont = ContoursLabelFont + ) + + let densityContourTrace = + Trace2D.initHistogram2DContour ( + Trace2DStyle.Histogram2DContour( + X = x, + Y = y, + Contours = contours, + Line = contourLines, + ?NContours = NContours, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?HistNorm = HistNorm, + ?Opacity = ContourOpacity + ) + ) + + [ + densityContourTrace :> Trace + pointTrace :> Trace + ] + |> GenericChart.ofTraceObjects useDefaults + + /// Creates a point density plot from encoded x and y coordinates. + [] + static member PointDensity + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + ?PointOpacity: float, + ?PointMarkerColor: Color, + ?PointMarkerSymbol: StyleParam.MarkerSymbol, + ?PointMarkerSize: int, + ?ContourLinesColor: Color, + ?ContourLinesDash: StyleParam.DrawingStyle, + ?ContourLinesSmoothing: float, + ?ContourLinesWidth: float, + ?ContourLines: Line, + ?ShowContourLines: bool, + ?ContoursColoring: StyleParam.ContourColoring, + ?ContoursOperation: StyleParam.ConstraintOperation, + ?ContoursType: StyleParam.ContourType, + ?ShowContoursLabels: bool, + ?ContoursLabelFont: Font, + ?ContoursStart: float, + ?ContoursEnd: float, + ?Contours: Contours, + ?NContours: int, + ?HistNorm: StyleParam.HistNorm, + ?ContourOpacity: float, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?UseDefaults: bool + ) = + + let showContourLines = + defaultArg ShowContourLines false + + let pointOpacity = + defaultArg PointOpacity 0.3 + + let contoursColoring = + defaultArg ContoursColoring StyleParam.ContourColoring.Fill + + let useDefaults = + defaultArg UseDefaults true + + let contourLinesWidth = + ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0. + + let marker = + Marker.init (?Color = PointMarkerColor, ?Symbol = PointMarkerSymbol, ?Size = PointMarkerSize) + + let pointTrace = + Trace2D.initScatter ( + Trace2DStyle.Scatter( + XEncoded = xEncoded, + YEncoded = yEncoded, + Mode = StyleParam.Mode.Markers, + Marker = marker, + Opacity = pointOpacity + ) + ) + + let contourLines = + ContourLines + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + Width = contourLinesWidth, + ?Color = ContourLinesColor, + ?Dash = ContourLinesDash, + ?Smoothing = ContourLinesSmoothing + ) + + let contours = + Contours + |> Option.defaultValue (TraceObjects.Contours.init ()) + |> TraceObjects.Contours.style ( + Coloring = contoursColoring, + ?Operation = ContoursOperation, + ?Start = ContoursStart, + ?End = ContoursEnd, + ?Type = ContoursType, + ?ShowLabels = ShowContoursLabels, + ?LabelFont = ContoursLabelFont + ) + + let densityContourTrace = + Trace2D.initHistogram2DContour ( + Trace2DStyle.Histogram2DContour( + XEncoded = xEncoded, + YEncoded = yEncoded, + Contours = contours, + Line = contourLines, + ?NContours = NContours, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?HistNorm = HistNorm, + ?Opacity = ContourOpacity + ) + ) + + [ + densityContourTrace :> Trace + pointTrace :> Trace + ] + |> GenericChart.ofTraceObjects useDefaults + diff --git a/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Statistical.fs b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Statistical.fs new file mode 100644 index 00000000..9addaacf --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart2D/Chart2D_Statistical.fs @@ -0,0 +1,623 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +open System.Runtime.CompilerServices + +open System.Runtime.InteropServices + +[] +module Chart2D_Statistical = + [] + type Chart = + /// Creates a Pareto chart. + /// Sets the (key,value) pairs that are plotted as the size and key of each bar. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the y axis label. + /// Determines whether or not grid lines are drawn. If "true", the grid lines are drawn for the pareto distribution figure; defaults to true. + [] + static member Pareto + ( + keysValues: seq<#IConvertible * float> + , ?Name: string + , ?Label: string + , ?ShowGrid: bool + ) = + let orderedLabels, orderedValues = + keysValues + |> Seq.sortByDescending snd + |> Seq.unzip + + let sum = orderedValues |> Seq.sum + let topPaddingRatio = 0.05 + let cumulativeSum = + Seq.scan (+) 0. orderedValues + |> Seq.skip 1 + + let paretoValues = + Seq.zip orderedLabels cumulativeSum + |> Seq.map (fun (label,value) -> label, value / sum * 100.) + + let bars = Chart.Column(Seq.zip orderedLabels orderedValues,?Name=Name) + + let lines = + Chart.Line( + paretoValues + , Name = "Cumulative %" + , ShowLegend = true + , ShowMarkers = true + , Marker = Marker.init(Size = 8, Symbol = StyleParam.MarkerSymbol.Cross, Angle = 45.) + ) + |> Chart.withAxisAnchor (Y = 2) + + [bars;lines] + |> Chart.combine + |> Chart.withYAxisStyle ( + ?TitleText = Label + , Id = StyleParam.SubPlotId.YAxis 1 + , ShowGrid = false + , MinMax = (0.,sum * (1.+topPaddingRatio)) + ) + |> Chart.withYAxisStyle ( + TitleText = "%" + , Side = StyleParam.Side.Right + , Id = StyleParam.SubPlotId.YAxis 2 + , MinMax = (0.,100. * (1.+topPaddingRatio)) + , Overlaying = StyleParam.LinearAxisId.Y 1 + , ?ShowGrid = ShowGrid + ) + + /// Creates a Pareto chart. + /// Sets the labels that are matching the . + /// Sets the values that are plotted as the size of each bar. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the y axis label. + /// Determines whether or not grid lines are drawn. If "true", the grid lines are drawn for the pareto distribution figure; defaults to true. + static member Pareto + ( + labels: seq<#IConvertible> + , values: seq + , ?Name: string + , ?Label: string + , ?ShowGrid: bool + ) = + Chart.Pareto(Seq.zip labels values, ?Name=Name, ?Label=Label, ?ShowGrid=ShowGrid) + + /// Displays a residue Chart by displaying the y values in relation to the provided reference Values. + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data for the Y value. + /// Sets the y coordinates for reference Y value. + /// Sets the trace name of the Y values. The trace name appear as the legend item and on hover + /// Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover + /// Sets the name of the legendgroup for the data distribution trace of this plot. + /// Sets the name of the legendgroup for the reference trace of this plot. + /// Determines whether or not an To show markers for each datum. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum for the Y values. + /// Sets individual text for each datum for the Y values. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker for the Y values. + /// Sets the colorscale of the marker for the Y values. + /// Sets the outline of the marker for the Y values. + /// Sets the marker symbol for each datum for the Y values. + /// Sets the marker symbol for each individual datum for the Y values. + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the Y values. + /// Sets the size of the datapoint markers for the Y values. + /// Sets the color of the line for the Y values. + /// Sets the colorscale of the line for the Y values. + /// Sets the width of the line for the Y values. + /// sets the drawing style of the line for the Y values. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the Y values. + /// Sets if the reference Line should be visible. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the reference Y values. + /// Sets the width of the line for the reference Y values. + /// Sets the color of the line for the reference Y values. + /// Sets a text associated with each datum for the reference Y values. + /// Sets individual text for each datum for the reference Y values. + /// Sets the position of text associated with each reference datum. + /// Sets the position of text associated with each individual reference datum + /// Sets the font used for `text` in Text. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Residual + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + reference: seq<#IConvertible>, + ?Name: string, + ?ReferenceName: string, + ?LegendGroupData: string, + ?LegendGroupReference: string, + ?ShowMarkers: bool, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?MarkerSize: int, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?ShowReference: bool, + ?ReferenceLine: Line, + ?ReferenceWidth: int, + ?ReferenceColor: Color, + ?ReferenceText: #IConvertible, + ?MultiReferenceText: seq<#IConvertible>, + ?ReferenceTextPosition: StyleParam.TextPosition, + ?MultiReferenceTextPosition: seq, + ?TextFont: Font, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let referenceName = defaultArg ReferenceName "Reference Line" + + // if text position or font is set than show labels (not only when hovering) + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || TextFont.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + let showReference = + let showBool = + match ShowReference with + | Some showRef -> showRef + | None -> true + if showBool then + StyleParam.Visible.True + else + StyleParam.Visible.False + + let markerSize = defaultArg MarkerSize 10 + + let (data,pointS) = + Seq.zip3 x y reference + |> Seq.collect(fun (x,y,refV) -> + [ + (x,refV),0 + (x,y),markerSize + (x,refV),0 + ] + ) + |> Array.ofSeq + |> Array.unzip + + let (x1,y1) = Array.unzip data + + let marker = + defaultArg + Marker + (TraceObjects.Marker.init( + MultiSize=pointS, + Opacity=1., + ?Color = MarkerColor, + ?Colorscale = MarkerColorScale, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol + )) + + let trace = + Chart.Scatter( + x = x1, + y = y1, + mode = changeMode StyleParam.Mode.Lines_Markers, + Opacity = 1., + Marker = marker, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line + ) + |> GenericChart.mapTrace ( + Trace2DStyle.Scatter( + ?LegendGroup = LegendGroupData + ) + ) + + let referenceLine = + Trace2D.initScatter( + Trace2DStyle.Scatter( + X = x, + Y = reference, + Mode = StyleParam.Mode.Lines, + ?Name = Some referenceName, + ?Visible = Some showReference, + ?ShowLegend = ShowLegend, + ?Text = ReferenceText, + ?MultiText = MultiReferenceText, + ?TextPosition = ReferenceTextPosition, + ?MultiTextPosition = MultiReferenceTextPosition, + ?Line = ReferenceLine, + ?LegendGroup = LegendGroupReference + ) + ) + |> TraceStyle.Marker( + Color = defaultArg ReferenceColor (Plotly.NET.Color.fromString "rgba(0, 0, 0, 1)"), + Size = defaultArg ReferenceWidth 10 + ) + + GenericChart.ofTraceObjects + useDefaults + [ + yield! (GenericChart.getTraces trace) + referenceLine + ] + + + /// Displays a residue Chart by displaying the y values in relation to the provided reference Values. + /// Sets the x and y coordinates of the plotted data. + /// Sets the y coordinates for reference Y value. + /// Sets the trace name of the Y values. The trace name appear as the legend item and on hover + /// Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover + /// Sets the name of the legendgroup for the data distribution trace of this plot. + /// Sets the name of the legendgroup for the reference trace of this plot. + /// Determines whether or not an To show markers for each datum. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum for the Y values. + /// Sets individual text for each datum for the Y values. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker for the Y values. + /// Sets the colorscale of the marker for the Y values. + /// Sets the outline of the marker for the Y values. + /// Sets the marker symbol for each datum for the Y values. + /// Sets the marker symbol for each individual datum for the Y values. + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the Y values. + /// Sets the size of the datapoint markers for the Y values. + /// Sets the color of the line for the Y values. + /// Sets the colorscale of the line for the Y values. + /// Sets the width of the line for the Y values. + /// sets the drawing style of the line for the Y values. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the Y values. + /// Sets if the reference Line should be visible. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the reference Y values. + /// Sets the width of the line for the reference Y values. + /// Sets the color of the line for the reference Y values. + /// Sets a text associated with each datum for the reference Y values. + /// Sets individual text for each datum for the reference Y values. + /// Sets the position of text associated with each reference datum. + /// Sets the position of text associated with each individual reference datum + /// Sets the font used for `text` in Text. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Residual + ( + xy: seq<#IConvertible*#IConvertible>, + reference: seq<#IConvertible>, + ?Name: string, + ?ReferenceName: string, + ?LegendGroupData: string, + ?LegendGroupReference: string, + ?ShowMarkers: bool, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?MarkerSize: int, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?ShowReference: bool, + ?ReferenceLine: Line, + ?ReferenceWidth: int, + ?ReferenceColor: Color, + ?ReferenceText: #IConvertible, + ?MultiReferenceText: seq<#IConvertible>, + ?ReferenceTextPosition: StyleParam.TextPosition, + ?MultiReferenceTextPosition: seq, + ?TextFont: Font, + ?UseDefaults: bool + ) = + + let (x,y) = Seq.unzip xy + Chart.Residual + ( + x = x, + y = y, + reference = reference, + ?Name = Name, + ?ReferenceName = ReferenceName, + ?LegendGroupData = LegendGroupData, + ?LegendGroupReference = LegendGroupReference, + ?ShowMarkers = ShowMarkers, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?MarkerSize = MarkerSize, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?ShowReference = ShowReference, + ?ReferenceLine = ReferenceLine, + ?ReferenceWidth = ReferenceWidth, + ?ReferenceColor = ReferenceColor, + ?ReferenceText = ReferenceText, + ?MultiReferenceText = MultiReferenceText, + ?ReferenceTextPosition = ReferenceTextPosition, + ?MultiReferenceTextPosition = MultiReferenceTextPosition, + ?TextFont = TextFont, + ?UseDefaults = UseDefaults + ) + + + /// Displays a residue Chart by displaying the y values in relation to the provided reference Values. + /// Sets the x and y coordinates of the plotted data. + /// Sets the y coordinate for reference Y value. + /// Sets the trace name of the Y values. The trace name appear as the legend item and on hover + /// Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover + /// Sets the name of the legendgroup for the data distribution trace of this plot. + /// Sets the name of the legendgroup for the reference trace of this plot. + /// Determines whether or not an To show markers for each datum. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum for the Y values. + /// Sets individual text for each datum for the Y values. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker for the Y values. + /// Sets the colorscale of the marker for the Y values. + /// Sets the outline of the marker for the Y values. + /// Sets the marker symbol for each datum for the Y values. + /// Sets the marker symbol for each individual datum for the Y values. + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the Y values. + /// Sets the size of the datapoint markers for the Y values. + /// Sets the color of the line for the Y values. + /// Sets the colorscale of the line for the Y values. + /// Sets the width of the line for the Y values. + /// sets the drawing style of the line for the Y values. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the Y values. + /// Sets if the reference Line should be visible. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the reference Y values. + /// Sets the width of the line for the reference Y values. + /// Sets the color of the line for the reference Y values. + /// Sets a text associated with each datum for the reference Y values. + /// Sets individual text for each datum for the reference Y values. + /// Sets the position of text associated with each reference datum. + /// Sets the position of text associated with each individual reference datum + /// Sets the font used for `text` in Text. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Residual + ( + xy: seq<#IConvertible*#IConvertible>, + referenceValue: #IConvertible, + ?Name: string, + ?ReferenceName: string, + ?LegendGroupData :string, + ?LegendGroupReference :string, + ?ShowMarkers: bool, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?MarkerSize: int, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?ShowReference: bool, + ?ReferenceLine: Line, + ?ReferenceWidth: int, + ?ReferenceColor: Color, + ?ReferenceText: #IConvertible, + ?MultiReferenceText: seq<#IConvertible>, + ?ReferenceTextPosition: StyleParam.TextPosition, + ?MultiReferenceTextPosition: seq, + ?TextFont: Font, + ?UseDefaults: bool + ) = + + let (x,y) = Seq.unzip xy + let reference = Seq.map(fun x -> referenceValue) x + Chart.Residual + ( + x = x, + y = y, + reference = reference, + ?Name = Name, + ?ReferenceName = ReferenceName, + ?LegendGroupData = LegendGroupData, + ?LegendGroupReference = LegendGroupReference, + ?ShowMarkers = ShowMarkers, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?MarkerSize = MarkerSize, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?ShowReference = ShowReference, + ?ReferenceLine = ReferenceLine, + ?ReferenceWidth = ReferenceWidth, + ?ReferenceColor = ReferenceColor, + ?ReferenceText = ReferenceText, + ?MultiReferenceText = MultiReferenceText, + ?ReferenceTextPosition = ReferenceTextPosition, + ?MultiReferenceTextPosition = MultiReferenceTextPosition, + ?TextFont = TextFont, + ?UseDefaults = UseDefaults + ) + + + /// + /// Displays a residue Chart by displaying the y values in relation to the provided reference Values. + /// + /// + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Sets the y coordinate for reference Y value. + /// Sets the trace name of the Y values. The trace name appear as the legend item and on hover + /// Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover + /// Sets the name of the legendgroup for the data distribution trace of this plot. + /// Sets the name of the legendgroup for the reference trace of this plot. + /// Determines whether or not an To show markers for each datum. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets a text associated with each datum for the Y values. + /// Sets individual text for each datum for the Y values. + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker for the Y values. + /// Sets the colorscale of the marker for the Y values. + /// Sets the outline of the marker for the Y values. + /// Sets the marker symbol for each datum for the Y values. + /// Sets the marker symbol for each individual datum for the Y values. + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) for the Y values. + /// Sets the size of the datapoint markers for the Y values. + /// Sets the color of the line for the Y values. + /// Sets the colorscale of the line for the Y values. + /// Sets the width of the line for the Y values. + /// sets the drawing style of the line for the Y values. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the Y values. + /// Sets if the reference Line should be visible. + /// Sets the line (use this for more finegrained control than the other line-associated arguments) for the reference Y values. + /// Sets the width of the line for the reference Y values. + /// Sets the color of the line for the reference Y values. + /// Sets a text associated with each datum for the reference Y values. + /// Sets individual text for each datum for the reference Y values. + /// Sets the position of text associated with each reference datum. + /// Sets the position of text associated with each individual reference datum + /// Sets the font used for `text` in Text. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Residual + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + referenceValue: #IConvertible, + ?Name: string, + ?ReferenceName: string, + ?LegendGroupData: string, + ?LegendGroupReference: string, + ?ShowMarkers: bool, + ?ShowLegend: bool, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?MarkerSize: int, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?ShowReference: bool, + ?ReferenceLine: Line, + ?ReferenceWidth: int, + ?ReferenceColor: Color, + ?ReferenceText: #IConvertible, + ?MultiReferenceText: seq<#IConvertible>, + ?ReferenceTextPosition: StyleParam.TextPosition, + ?MultiReferenceTextPosition: seq, + ?TextFont: Font, + ?UseDefaults: bool + ) = + + let reference = Seq.map(fun x -> referenceValue) x + Chart.Residual + ( + x = x, + y = y, + reference = reference, + ?Name = Name, + ?ReferenceName = ReferenceName, + ?LegendGroupData = LegendGroupData, + ?LegendGroupReference = LegendGroupReference, + ?ShowMarkers = ShowMarkers, + ?ShowLegend = ShowLegend, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?MarkerSize = MarkerSize, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?ShowReference = ShowReference, + ?ReferenceLine = ReferenceLine, + ?ReferenceWidth = ReferenceWidth, + ?ReferenceColor = ReferenceColor, + ?ReferenceText = ReferenceText, + ?MultiReferenceText = MultiReferenceText, + ?ReferenceTextPosition = ReferenceTextPosition, + ?MultiReferenceTextPosition = MultiReferenceTextPosition, + ?TextFont = TextFont, + ?UseDefaults = UseDefaults + ) diff --git a/src/Plotly.NET/ChartAPI/Chart3D.fs b/src/Plotly.NET/ChartAPI/Chart3D.fs deleted file mode 100644 index 0060e5f3..00000000 --- a/src/Plotly.NET/ChartAPI/Chart3D.fs +++ /dev/null @@ -1,2482 +0,0 @@ -namespace Plotly.NET - -open Plotly.NET.LayoutObjects -open Plotly.NET.TraceObjects - -open DynamicObj -open System -open System.IO -//open FSharp.Care.Collections - -open StyleParam -open System.Runtime.InteropServices -open System.Runtime.CompilerServices - -[] -module Chart3D = - - [] - type Chart = - - /// - /// Creates a Scatter3D plot. - /// - /// In general, Scatter3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension. - /// - /// Scatter3D charts are the basis of Point3D, Line3D, and Bubble3D Charts, and can be customized as such. We also provide abstractions for those: Chart.Line3D, Chart.Point3D, Chart.Bubble3D - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Sets the z coordinates of the plotted data. - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// Sets the projection of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Scatter3D - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - z: seq<#IConvertible>, - mode: StyleParam.Mode, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol3D = MarkerSymbol, - ?MultiSymbol3D = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity - ) - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Dash = LineDash, - ?Colorscale = LineColorScale, - ?Width = LineWidth - ) - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initScatter3D ( - Trace3DStyle.Scatter3D( - X = x, - Y = y, - Z = z, - Mode = mode, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Projection = Projection, - Marker = marker, - Line = line - ) - ) - - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Creates a Scatter3D plot from encoded x, y, and z coordinates. - /// - /// Sets the x coordinates of the plotted data as an encoded typed array. - /// Sets the y coordinates of the plotted data as an encoded typed array. - /// Sets the z coordinates of the plotted data as an encoded typed array. - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// Sets the projection of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Scatter3D - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - zEncoded: EncodedTypedArray, - mode: StyleParam.Mode, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol3D = MarkerSymbol, - ?MultiSymbol3D = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity - ) - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Dash = LineDash, - ?Colorscale = LineColorScale, - ?Width = LineWidth - ) - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initScatter3D ( - Trace3DStyle.Scatter3D( - XEncoded = xEncoded, - YEncoded = yEncoded, - ZEncoded = zEncoded, - Mode = mode, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Projection = Projection, - Marker = marker, - Line = line - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - - /// - /// Creates a Scatter3D plot. - /// - /// In general, Scatter3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension. - /// - /// Scatter3D charts are the basis of Point3D, Line3D, and Bubble3D Charts, and can be customized as such. We also provide abstractions for those: Chart.Line3D, Chart.Point3D, Chart.Bubble3D - /// - /// Sets the x, y, and z coordinates of the plotted data. - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// Sets the projection of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Scatter3D - ( - xyz: seq<#IConvertible * #IConvertible * #IConvertible>, - mode: StyleParam.Mode, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let x, y, z = Seq.unzip3 xyz - - Chart.Scatter3D( - x, - y, - z, - mode, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?Projection = Projection, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a Point3D plot. - /// - /// Point3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as points. - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Sets the z coordinates of the plotted data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// Sets the projection of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Point3D - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - z: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - // if text position or font is set, then show labels (not only when hovering) - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - Chart.Scatter3D( - x = x, - y = y, - z = z, - mode = changeMode StyleParam.Mode.Markers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?Projection = Projection, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a Point3D plot. - /// - /// Point3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as points. - /// - /// Sets the x, y, and z coordinates of the plotted data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// Sets the projection of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Point3D - ( - xyz: seq<#IConvertible * #IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let x, y, z = Seq.unzip3 xyz - - Chart.Point3D( - x, - y, - z, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?Projection = Projection, - ?UseDefaults = UseDefaults - ) - - /// Creates a Point3D plot from encoded x, y, and z coordinates. - [] - static member Point3D - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - zEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - Chart.Scatter3D( - xEncoded = xEncoded, - yEncoded = yEncoded, - zEncoded = zEncoded, - mode = changeMode StyleParam.Mode.Markers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?Projection = Projection, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?UseDefaults = UseDefaults - ) - - - /// - /// Creates a Line3D plot. - /// - /// Line3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as a line connecting the individual datums. - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Sets the z coordinates of the plotted data. - /// Whether to show markers for the datums additionally to the line - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// Sets the projection of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Line3D - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - z: seq<#IConvertible>, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - Chart.Scatter3D( - x = x, - y = y, - z = z, - mode = changeMode StyleParam.Mode.Lines, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?Projection = Projection, - ?UseDefaults = UseDefaults - - ) - - /// - /// Creates a Line3D plot. - /// - /// Line3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as a line connecting the individual datums. - /// - /// Sets the x, y, and z coordinates of the plotted data. - /// Whether to show markers for the datums additionally to the line - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// Sets the projection of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Line3D - ( - xyz: seq<#IConvertible * #IConvertible * #IConvertible>, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let x, y, z = Seq.unzip3 xyz - - Chart.Line3D( - x, - y, - z, - ?ShowMarkers = ShowMarkers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?Projection = Projection, - ?UseDefaults = UseDefaults - ) - - /// Creates a Line3D plot from encoded x, y, and z coordinates. - [] - static member Line3D - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - zEncoded: EncodedTypedArray, - ?ShowMarkers: bool, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - Chart.Scatter3D( - xEncoded = xEncoded, - yEncoded = yEncoded, - zEncoded = zEncoded, - mode = changeMode StyleParam.Mode.Lines, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?Projection = Projection, - ?UseDefaults = UseDefaults - ) - - - /// - /// Creates a Bubble3D plot. - /// - /// Bubble3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as points, additionally using the points size as a 4th dimension. - /// - /// Sets the x coordinates of the plotted data. - /// Sets the y coordinates of the plotted data. - /// Sets the z coordinates of the plotted data. - /// Sets the size of the points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// Sets the projection of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Bubble3D - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - z: seq<#IConvertible>, - sizes: seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol3D = MarkerSymbol, - ?MultiSymbol3D = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity, - MultiSize = sizes - ) - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initScatter3D ( - Trace3DStyle.Scatter3D( - X = x, - Y = y, - Z = z, - Mode = changeMode StyleParam.Mode.Markers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Projection = Projection, - Marker = marker - ) - ) - - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// Creates a Bubble3D plot from encoded x, y, and z coordinates. - [] - static member Bubble3D - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - zEncoded: EncodedTypedArray, - sizes: seq, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol3D = MarkerSymbol, - ?MultiSymbol3D = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity, - MultiSize = sizes - ) - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initScatter3D ( - Trace3DStyle.Scatter3D( - XEncoded = xEncoded, - YEncoded = yEncoded, - ZEncoded = zEncoded, - Mode = changeMode StyleParam.Mode.Markers, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Projection = Projection, - Marker = marker - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - - /// - /// Creates a Bubble3D plot. - /// - /// Bubble3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as points, additionally using the points size as a 4th dimension. - /// - /// Sets the x, y, and z coordinates of the plotted data. - /// Sets the size of the points - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// Sets the projection of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Bubble3D - ( - xyz, - sizes, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let x, y, z = Seq.unzip3 xyz - - Chart.Bubble3D( - x, - y, - z, - sizes, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?Projection = Projection, - ?UseDefaults = UseDefaults - - ) - - /// - /// Creates a Bubble3D plot. - /// - /// Bubble3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as points, additionally using the points size as a 4th dimension. - /// - /// Sets the x, y, and z coordinates together with the point size. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// Sets the projection of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Bubble3D - ( - xyzsizes, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol3D, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?Projection: Projection, - ?UseDefaults: bool - ) = - - let x, y, z, sizes = - xyzsizes |> Seq.map (fun (x, _, _, _) -> x), - xyzsizes |> Seq.map (fun (_, y, _, _) -> y), - xyzsizes |> Seq.map (fun (_, _, z, _) -> z), - xyzsizes |> Seq.map (fun (_, _, _, size) -> size) - - Chart.Bubble3D( - x, - y, - z, - sizes, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?Projection = Projection, - ?UseDefaults = UseDefaults - - ) - - /// - /// Creates a surface plot. - /// - /// Surface plots plot a z value as a function of x and y, creating a three-dimensional surface. - /// - /// The data the describes the coordinates of the surface is set in `z`. Data in `z` should be a 2D array. - /// Coordinates in `x` and `y` can either be 1D arrays or 2D arrays (e.g. to graph parametric surfaces). If not provided in `x` and `y`, the x and y coordinates are assumed to be linear starting at 0 with a unit step. - /// The color scale corresponds to the `z` values by default. For custom color scales, use `surfacecolor` which should be a 2D array, where its bounds can be controlled using `cmin` and `cmax`. - /// - /// Two-dimensional data array representing the surface's z values - /// Sets the x coordinates. - /// Sets the y coordinates. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the contours on the surface - /// Sets the colorscale of the surface - /// Whether or not to show the colorbar/colorscale - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Surface - ( - zData, - ?X: seq<#IConvertible>, - ?Y: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Contours: Contours, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initSurface ( - Trace3DStyle.Surface( - Z = zData, - ?X = X, - ?Y = Y, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Contours = Contours, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale - ) - ) - - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Creates a surface plot from an encoded z matrix and optional encoded x and y coordinates. - /// - [] - static member Surface - ( - zEncoded: EncodedTypedArray, - ?xEncoded: EncodedTypedArray, - ?yEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Contours: Contours, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initSurface ( - Trace3DStyle.Surface( - ZEncoded = zEncoded, - ?XEncoded = xEncoded, - ?YEncoded = yEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Contours = Contours, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Visualizes a 3D mesh. - /// - /// Draws sets of triangles with coordinates given by three 1-dimensional arrays in `x`, `y`, `z` and - /// - /// (1) a sets of `i`, `j`, `k` indices or - /// - /// (2) Delaunay triangulation or - /// - /// (3) the Alpha-shape algorithm or - /// - /// (4) the Convex-hull algorithm - /// - /// Sets the X coordinates of the vertices. The nth element of vectors `x`, `y` and `z` jointly represent the X, Y and Z coordinates of the nth vertex. - /// Sets the Y coordinates of the vertices. The nth element of vectors `x`, `y` and `z` jointly represent the X, Y and Z coordinates of the nth vertex. - /// Sets the Z coordinates of the vertices. The nth element of vectors `x`, `y` and `z` jointly represent the X, Y and Z coordinates of the nth vertex. - /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "first" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `i[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `i` represents a point in space, which is the first vertex of a triangle. - /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "second" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `j[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `j` represents a point in space, which is the second vertex of a triangle. - /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "third" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `k[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `k` represents a point in space, which is the third vertex of a triangle. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the whole mesh - /// Sets the style and visibility of contours - /// Sets the colorscale - /// Whether or not to show the colorbar/colorscale - /// Sets the colorbar - /// Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low-poly look via flat reflections. - /// Determines how the mesh surface triangles are derived from the set of vertices (points) represented by the `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays are not supplied. - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Mesh3D - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - z: seq<#IConvertible>, - ?I: seq<#IConvertible>, - ?J: seq<#IConvertible>, - ?K: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Color: Color, - ?Contour: Contour, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?FlatShading: bool, - ?TriangulationAlgorithm: StyleParam.TriangulationAlgorithm, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initMesh3D ( - Trace3DStyle.Mesh3D( - X = x, - Y = y, - Z = z, - ?I = I, - ?J = J, - ?K = K, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Color = Color, - ?Contour = Contour, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?FlatShading = FlatShading, - ?AlphaHull = TriangulationAlgorithm - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Visualizes a 3D mesh from encoded coordinate and optional encoded topology/intensity arrays. - /// - [] - static member Mesh3D - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - zEncoded: EncodedTypedArray, - ?iEncoded: EncodedTypedArray, - ?jEncoded: EncodedTypedArray, - ?kEncoded: EncodedTypedArray, - ?intensityEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Color: Color, - ?Contour: Contour, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?FlatShading: bool, - ?TriangulationAlgorithm: StyleParam.TriangulationAlgorithm, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initMesh3D ( - Trace3DStyle.Mesh3D( - XEncoded = xEncoded, - YEncoded = yEncoded, - ZEncoded = zEncoded, - ?IEncoded = iEncoded, - ?JEncoded = jEncoded, - ?KEncoded = kEncoded, - ?IntensityEncoded = intensityEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Color = Color, - ?Contour = Contour, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?FlatShading = FlatShading, - ?AlphaHull = TriangulationAlgorithm - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Visualizes a 3D mesh. - /// - /// Draws sets of triangles with coordinates given by three 1-dimensional arrays in `x`, `y`, `z` and - /// - /// (1) a sets of `i`, `j`, `k` indices or - /// - /// (2) Delaunay triangulation or - /// - /// (3) the Alpha-shape algorithm or - /// - /// (4) the Convex-hull algorithm - /// - /// Sets the X, Y, and Z coordinates of the vertices. The nth element of vectors `x`, `y` and `z` jointly represent the X, Y and Z coordinates of the nth vertex. - /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "first" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `i[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `i` represents a point in space, which is the first vertex of a triangle. - /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "second" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `j[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `j` represents a point in space, which is the second vertex of a triangle. - /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "third" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `k[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `k` represents a point in space, which is the third vertex of a triangle. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the whole mesh - /// Sets the style and visibility of contours - /// Sets the colorscale - /// Whether or not to show the colorbar/colorscale - /// Sets the colorbar - /// Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low-poly look via flat reflections. - /// Determines how the mesh surface triangles are derived from the set of vertices (points) represented by the `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays are not supplied. - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Mesh3D - ( - xyz: seq<#IConvertible * #IConvertible * #IConvertible>, - ?I: seq<#IConvertible>, - ?J: seq<#IConvertible>, - ?K: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?Color: Color, - ?Contour: Contour, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?FlatShading: bool, - ?TriangulationAlgorithm: StyleParam.TriangulationAlgorithm, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let x, y, z = Seq.unzip3 xyz - - Chart.Mesh3D( - x, - y, - z, - ?I = I, - ?J = J, - ?K = K, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Color = Color, - ?Contour = Contour, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?FlatShading = FlatShading, - ?TriangulationAlgorithm = TriangulationAlgorithm, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a cone plot, typically used to visualize vector fields. - /// - /// Specify a vector field using 6 1D arrays: - /// - /// 3 position arrays `x`, `y` and `z` and - /// - /// 3 vector component arrays `u`, `v`, `w`. - /// - /// The cones are drawn exactly at the positions given by `x`, `y` and `z`. - /// - /// Sets the x coordinates of the vector field and of the displayed cones. - /// Sets the y coordinates of the vector field and of the displayed cones. - /// Sets the z coordinates of the vector field and of the displayed cones. - /// Sets the x components of the vector field. - /// Sets the y components of the vector field. - /// Sets the z components of the vector field. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorscale - /// Whether or not to show the colorbar/colorscale - /// Sets the colorbar - /// Determines whether `sizeref` is set as a "scaled" (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as "absolute" value (in the same units as the vector field). - /// Sets the cones' anchor with respect to their x/y/z positions. Note that "cm" denote the cone's center of mass which corresponds to 1/4 from the tail to tip. - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Cone - ( - x: seq<#IConvertible>, - y: seq<#IConvertible>, - z: seq<#IConvertible>, - u: seq<#IConvertible>, - v: seq<#IConvertible>, - w: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?SizeMode: StyleParam.ConeSizeMode, - ?ConeAnchor: StyleParam.ConeAnchor, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initCone ( - Trace3DStyle.Cone( - X = x, - Y = y, - Z = z, - U = u, - V = v, - W = w, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?SizeMode = SizeMode, - ?Anchor = ConeAnchor - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Creates a cone plot from encoded vector-field coordinates and components. - /// - [] - static member Cone - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - zEncoded: EncodedTypedArray, - uEncoded: EncodedTypedArray, - vEncoded: EncodedTypedArray, - wEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?SizeMode: StyleParam.ConeSizeMode, - ?ConeAnchor: StyleParam.ConeAnchor, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initCone ( - Trace3DStyle.Cone( - XEncoded = xEncoded, - YEncoded = yEncoded, - ZEncoded = zEncoded, - UEncoded = uEncoded, - VEncoded = vEncoded, - WEncoded = wEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?SizeMode = SizeMode, - ?Anchor = ConeAnchor - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Creates a cone plot, typically used to visualize vector fields. - /// - /// Specify a vector field using 6 1D arrays: - /// - /// 3 position arrays `x`, `y` and `z` and - /// - /// 3 vector component arrays `u`, `v`, `w`. - /// - /// The cones are drawn exactly at the positions given by `x`, `y` and `z`. - /// - /// Sets the x, y, and z coordinates of the vector field and of the displayed cones. - /// Sets the x, y, and z components of the vector field. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorscale - /// Whether or not to show the colorbar/colorscale - /// Sets the colorbar - /// Determines whether `sizeref` is set as a "scaled" (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as "absolute" value (in the same units as the vector field). - /// Sets the cones' anchor with respect to their x/y/z positions. Note that "cm" denote the cone's center of mass which corresponds to 1/4 from the tail to tip. - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Cone - ( - coneXYZ: seq<#IConvertible * #IConvertible * #IConvertible>, - coneUVW: seq<#IConvertible * #IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?SizeMode: StyleParam.ConeSizeMode, - ?ConeAnchor: StyleParam.ConeAnchor, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let x, y, z = Seq.unzip3 coneXYZ - let u, v, w = Seq.unzip3 coneUVW - - Chart.Cone( - x, - y, - z, - u, - v, - w, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?SizeMode = SizeMode, - ?ConeAnchor = ConeAnchor, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a cone plot, typically used to visualize vector fields. - /// - /// Specify a vector field using 6 1D arrays: - /// - /// 3 position arrays `x`, `y` and `z` and - /// - /// 3 vector component arrays `u`, `v`, `w`. - /// - /// The cones are drawn exactly at the positions given by `x`, `y` and `z`. - /// - /// Sets the x, y, and z coordinates of the vector field and of the displayed cones together with the x, y, and z components of the vector field. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorscale - /// Whether or not to show the colorbar/colorscale - /// Sets the colorbar - /// Determines whether `sizeref` is set as a "scaled" (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as "absolute" value (in the same units as the vector field). - /// Sets the cones' anchor with respect to their x/y/z positions. Note that "cm" denote the cone's center of mass which corresponds to 1/4 from the tail to tip. - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Cone - ( - xyzuvw: - seq<#IConvertible * #IConvertible * #IConvertible * #IConvertible * #IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?SizeMode: StyleParam.ConeSizeMode, - ?ConeAnchor: StyleParam.ConeAnchor, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let x, y, z, u, v, w = - xyzuvw |> Seq.map (fun (x, _, _, _, _, _) -> x), - xyzuvw |> Seq.map (fun (_, y, _, _, _, _) -> y), - xyzuvw |> Seq.map (fun (_, _, z, _, _, _) -> z), - xyzuvw |> Seq.map (fun (_, _, _, u, _, _) -> u), - xyzuvw |> Seq.map (fun (_, _, _, _, v, _) -> v), - xyzuvw |> Seq.map (fun (_, _, _, _, _, w) -> w) - - Chart.Cone( - x, - y, - z, - u, - v, - w, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?SizeMode = SizeMode, - ?ConeAnchor = ConeAnchor, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a streamtube plot, typically used to visualize flow in a vector field. - /// - /// Specify a vector field using 6 1D arrays of equal length: - /// - /// 3 position arrays `x`, `y` and `z` and - /// - /// 3 vector component arrays `u`, `v`, and `w`. - /// - /// By default, the tubes' starting positions will be cut from the vector field's x-z plane at its minimum y value. - /// To specify your own starting position, use `TubeStarts`. - /// The color is encoded by the norm of (u, v, w), and the local radius by the divergence of (u, v, w). - /// - /// Sets the x coordinates of the vector field and of the displayed cones. - /// Sets the y coordinates of the vector field and of the displayed cones. - /// Sets the z coordinates of the vector field and of the displayed cones. - /// Sets the x components of the vector field. - /// Sets the y components of the vector field. - /// Sets the z components of the vector field. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorscale - /// Whether or not to show the colorbar/colorscale - /// Sets the colorbar - /// The maximum number of displayed segments in a streamtube. - /// Use this object to specify custom tube start positions - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member StreamTube - ( - x, - y, - z, - u, - v, - w, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?MaxDisplayed: int, - ?TubeStarts: StreamTubeStarts, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initStreamTube ( - Trace3DStyle.StreamTube( - X = x, - Y = y, - Z = z, - U = u, - V = v, - W = w, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?MaxDisplayed = MaxDisplayed, - ?Starts = TubeStarts - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Creates a streamtube plot from encoded vector-field coordinates and components. - /// - [] - static member StreamTube - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - zEncoded: EncodedTypedArray, - uEncoded: EncodedTypedArray, - vEncoded: EncodedTypedArray, - wEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?MaxDisplayed: int, - ?TubeStarts: StreamTubeStarts, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initStreamTube ( - Trace3DStyle.StreamTube( - XEncoded = xEncoded, - YEncoded = yEncoded, - ZEncoded = zEncoded, - UEncoded = uEncoded, - VEncoded = vEncoded, - WEncoded = wEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?MaxDisplayed = MaxDisplayed, - ?Starts = TubeStarts - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Creates a streamtube plot, typically used to visualize flow in a vector field. - /// - /// Specify a vector field using 6 1D arrays of equal length: - /// - /// 3 position arrays `x`, `y` and `z` and - /// - /// 3 vector component arrays `u`, `v`, and `w`. - /// - /// By default, the tubes' starting positions will be cut from the vector field's x-z plane at its minimum y value. - /// To specify your own starting position, use `TubeStarts`. - /// The color is encoded by the norm of (u, v, w), and the local radius by the divergence of (u, v, w). - /// - /// Sets the x, y, and z coordinates of the vector field and of the displayed cones. - /// Sets the x, y, and z components of the vector field. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorscale - /// Whether or not to show the colorbar/colorscale - /// Sets the colorbar - /// The maximum number of displayed segments in a streamtube. - /// Use this object to specify custom tube start positions - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member StreamTube - ( - streamTubeXYZ: seq<#IConvertible * #IConvertible * #IConvertible>, - streamTubeUVW: seq<#IConvertible * #IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?MaxDisplayed: int, - ?TubeStarts: StreamTubeStarts, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let x, y, z = Seq.unzip3 streamTubeXYZ - let u, v, w = Seq.unzip3 streamTubeUVW - - Chart.StreamTube( - x, - y, - z, - u, - v, - w, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?MaxDisplayed = MaxDisplayed, - ?TubeStarts = TubeStarts, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?UseDefaults = UseDefaults - - ) - - /// - /// Creates a streamtube plot, typically used to visualize flow in a vector field. - /// - /// Specify a vector field using 6 1D arrays of equal length: - /// - /// 3 position arrays `x`, `y` and `z` and - /// - /// 3 vector component arrays `u`, `v`, and `w`. - /// - /// By default, the tubes' starting positions will be cut from the vector field's x-z plane at its minimum y value. - /// To specify your own starting position, use `TubeStarts`. - /// The color is encoded by the norm of (u, v, w), and the local radius by the divergence of (u, v, w). - /// - /// Sets the x, y, and z coordinates of the vector field and of the displayed cones together with the x, y, and z components of the vector field. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorscale - /// Whether or not to show the colorbar/colorscale - /// Sets the colorbar - /// The maximum number of displayed segments in a streamtube. - /// Use this object to specify custom tube start positions - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member StreamTube - ( - xyzuvw: - seq<#IConvertible * #IConvertible * #IConvertible * #IConvertible * #IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?MaxDisplayed: int, - ?TubeStarts: StreamTubeStarts, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let x, y, z, u, v, w = - xyzuvw |> Seq.map (fun (x, _, _, _, _, _) -> x), - xyzuvw |> Seq.map (fun (_, y, _, _, _, _) -> y), - xyzuvw |> Seq.map (fun (_, _, z, _, _, _) -> z), - xyzuvw |> Seq.map (fun (_, _, _, u, _, _) -> u), - xyzuvw |> Seq.map (fun (_, _, _, _, v, _) -> v), - xyzuvw |> Seq.map (fun (_, _, _, _, _, w) -> w) - - Chart.StreamTube( - x, - y, - z, - u, - v, - w, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?MaxDisplayed = MaxDisplayed, - ?TubeStarts = TubeStarts, - ?CameraProjectionType = CameraProjectionType, - ?Camera = Camera, - ?UseDefaults = UseDefaults - - ) - - /// - /// Creates a volume plot to visualize the volume of a 3D shape. - /// - /// Draws volume trace between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex of a uniform or non-uniform 3-D grid. - /// Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace. - /// - /// This plot is very similar to the `IsoSurface` plot. However, whereas isosurface plots show all surfaces with the same opacity, tweaking the opacityscale parameter of Volume plots results in a depth effect and better volume rendering. - /// - /// Sets the X coordinates of the vertices on X axis. - /// Sets the Y coordinates of the vertices on Y axis. - /// Sets the Z coordinates of the vertices on Z axis. - /// Sets the 4th dimension (value) of the vertices. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorscale - /// Whether or not to show the colorbar/colorscale - /// Sets the colorbar - /// Sets the minimum boundary for iso-surface plot. - /// Sets the maximum boundary for iso-surface plot. - /// Sets the caps (color-coded surfaces on the sides of the visualization domain) - /// Adds Slices through the volume - /// Sets the surface. - /// Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower values would have higher opacity values and those in the middle would be more transparent Alternatively, `opacityscale` may be a palette name string of the following list: 'min', 'max', 'extremes' and 'uniform'. The default is 'uniform'. - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Volume - ( - x, - y, - z, - value, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?IsoMin: float, - ?IsoMax: float, - ?Caps: Caps, - ?Slices: Slices, - ?Surface: Surface, - ?OpacityScale: seq<#seq<#IConvertible>>, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initVolume ( - Trace3DStyle.Volume( - X = x, - Y = y, - Z = z, - Value = value, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?IsoMin = IsoMin, - ?IsoMax = IsoMax, - ?Caps = Caps, - ?Slices = Slices, - ?Surface = Surface, - ?OpacityScale = OpacityScale - ) - ) - - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Creates a volume plot from encoded coordinate and value arrays. - /// - [] - static member Volume - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - zEncoded: EncodedTypedArray, - valueEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?IsoMin: float, - ?IsoMax: float, - ?Caps: Caps, - ?Slices: Slices, - ?Surface: Surface, - ?OpacityScaleEncoded: EncodedTypedArray, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initVolume ( - Trace3DStyle.Volume( - XEncoded = xEncoded, - YEncoded = yEncoded, - ZEncoded = zEncoded, - ValueEncoded = valueEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?IsoMin = IsoMin, - ?IsoMax = IsoMax, - ?Caps = Caps, - ?Slices = Slices, - ?Surface = Surface, - ?OpacityScaleEncoded = OpacityScaleEncoded - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Creates a isosurface plot to visualize the volume of a 3D shape. - /// - /// An isosurface is a surface that represents points of a constant value (e.g. pressure, temperature, velocity, density) within a volume of space. - /// - /// Draws isosurfaces between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex of a uniform or non-uniform 3-D grid. - /// Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace. - /// - /// This plot is very similar to the `Volume` plot. However it shows all surfaces with the same opacity. - /// - /// Sets the X coordinates of the vertices on X axis. - /// Sets the Y coordinates of the vertices on Y axis. - /// Sets the Z coordinates of the vertices on Z axis. - /// Sets the 4th dimension (value) of the vertices. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorscale - /// Whether or not to show the colorbar/colorscale - /// Sets the colorbar - /// Sets the minimum boundary for iso-surface plot. - /// Sets the maximum boundary for iso-surface plot. - /// Sets the caps (color-coded surfaces on the sides of the visualization domain) - /// Adds Slices through the volume - /// Sets the surface. - /// Sets the camera projection type of this trace. - /// Sets the camera of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member IsoSurface - ( - x, - y, - z, - value, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?IsoMin: float, - ?IsoMax: float, - ?Caps: Caps, - ?Slices: Slices, - ?Surface: Surface, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initIsoSurface ( - Trace3DStyle.IsoSurface( - X = x, - Y = y, - Z = z, - Value = value, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?IsoMin = IsoMin, - ?IsoMax = IsoMax, - ?Caps = Caps, - ?Slices = Slices, - ?Surface = Surface - - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) - - /// - /// Creates an isosurface plot from encoded coordinate and value arrays. - /// - [] - static member IsoSurface - ( - xEncoded: EncodedTypedArray, - yEncoded: EncodedTypedArray, - zEncoded: EncodedTypedArray, - valueEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ColorBar: ColorBar, - ?IsoMin: float, - ?IsoMax: float, - ?Caps: Caps, - ?Slices: Slices, - ?Surface: Surface, - ?CameraProjectionType: StyleParam.CameraProjectionType, - ?Camera: Camera, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let cameraProjection = - defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective - - let camera = - Camera - |> Option.defaultValue (LayoutObjects.Camera.init ()) - |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) - - Trace3D.initIsoSurface ( - Trace3DStyle.IsoSurface( - XEncoded = xEncoded, - YEncoded = yEncoded, - ZEncoded = zEncoded, - ValueEncoded = valueEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ColorBar = ColorBar, - ?IsoMin = IsoMin, - ?IsoMax = IsoMax, - ?Caps = Caps, - ?Slices = Slices, - ?Surface = Surface - - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout ( - Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) - ) diff --git a/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Scatter.fs b/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Scatter.fs new file mode 100644 index 00000000..186ce932 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Scatter.fs @@ -0,0 +1,1177 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +//open FSharp.Care.Collections + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module Chart3D_Scatter = + + [] + type Chart = + /// + /// Creates a Scatter3D plot. + /// + /// In general, Scatter3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension. + /// + /// Scatter3D charts are the basis of Point3D, Line3D, and Bubble3D Charts, and can be customized as such. We also provide abstractions for those: Chart.Line3D, Chart.Point3D, Chart.Bubble3D + /// + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Sets the z coordinates of the plotted data. + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// Sets the projection of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Scatter3D + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + z: seq<#IConvertible>, + mode: StyleParam.Mode, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol3D = MarkerSymbol, + ?MultiSymbol3D = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity + ) + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Dash = LineDash, + ?Colorscale = LineColorScale, + ?Width = LineWidth + ) + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initScatter3D ( + Trace3DStyle.Scatter3D( + X = x, + Y = y, + Z = z, + Mode = mode, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Projection = Projection, + Marker = marker, + Line = line + ) + ) + + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Creates a Scatter3D plot from encoded x, y, and z coordinates. + /// + /// Sets the x coordinates of the plotted data as an encoded typed array. + /// Sets the y coordinates of the plotted data as an encoded typed array. + /// Sets the z coordinates of the plotted data as an encoded typed array. + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// Sets the projection of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Scatter3D + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + zEncoded: EncodedTypedArray, + mode: StyleParam.Mode, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol3D = MarkerSymbol, + ?MultiSymbol3D = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity + ) + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Dash = LineDash, + ?Colorscale = LineColorScale, + ?Width = LineWidth + ) + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initScatter3D ( + Trace3DStyle.Scatter3D( + XEncoded = xEncoded, + YEncoded = yEncoded, + ZEncoded = zEncoded, + Mode = mode, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Projection = Projection, + Marker = marker, + Line = line + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + + /// + /// Creates a Scatter3D plot. + /// + /// In general, Scatter3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension. + /// + /// Scatter3D charts are the basis of Point3D, Line3D, and Bubble3D Charts, and can be customized as such. We also provide abstractions for those: Chart.Line3D, Chart.Point3D, Chart.Bubble3D + /// + /// Sets the x, y, and z coordinates of the plotted data. + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// Sets the projection of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Scatter3D + ( + xyz: seq<#IConvertible * #IConvertible * #IConvertible>, + mode: StyleParam.Mode, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let x, y, z = Seq.unzip3 xyz + + Chart.Scatter3D( + x, + y, + z, + mode, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?Projection = Projection, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a Point3D plot. + /// + /// Point3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as points. + /// + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Sets the z coordinates of the plotted data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// Sets the projection of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Point3D + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + z: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + // if text position or font is set, then show labels (not only when hovering) + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + Chart.Scatter3D( + x = x, + y = y, + z = z, + mode = changeMode StyleParam.Mode.Markers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?Projection = Projection, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a Point3D plot. + /// + /// Point3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as points. + /// + /// Sets the x, y, and z coordinates of the plotted data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// Sets the projection of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Point3D + ( + xyz: seq<#IConvertible * #IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let x, y, z = Seq.unzip3 xyz + + Chart.Point3D( + x, + y, + z, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?Projection = Projection, + ?UseDefaults = UseDefaults + ) + + /// Creates a Point3D plot from encoded x, y, and z coordinates. + [] + static member Point3D + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + zEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + Chart.Scatter3D( + xEncoded = xEncoded, + yEncoded = yEncoded, + zEncoded = zEncoded, + mode = changeMode StyleParam.Mode.Markers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?Projection = Projection, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?UseDefaults = UseDefaults + ) + + + /// + /// Creates a Line3D plot. + /// + /// Line3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as a line connecting the individual datums. + /// + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Sets the z coordinates of the plotted data. + /// Whether to show markers for the datums additionally to the line + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// Sets the projection of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Line3D + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + z: seq<#IConvertible>, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + Chart.Scatter3D( + x = x, + y = y, + z = z, + mode = changeMode StyleParam.Mode.Lines, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?Projection = Projection, + ?UseDefaults = UseDefaults + + ) + + /// + /// Creates a Line3D plot. + /// + /// Line3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as a line connecting the individual datums. + /// + /// Sets the x, y, and z coordinates of the plotted data. + /// Whether to show markers for the datums additionally to the line + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// Sets the projection of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Line3D + ( + xyz: seq<#IConvertible * #IConvertible * #IConvertible>, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let x, y, z = Seq.unzip3 xyz + + Chart.Line3D( + x, + y, + z, + ?ShowMarkers = ShowMarkers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?Projection = Projection, + ?UseDefaults = UseDefaults + ) + + /// Creates a Line3D plot from encoded x, y, and z coordinates. + [] + static member Line3D + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + zEncoded: EncodedTypedArray, + ?ShowMarkers: bool, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + Chart.Scatter3D( + xEncoded = xEncoded, + yEncoded = yEncoded, + zEncoded = zEncoded, + mode = changeMode StyleParam.Mode.Lines, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?Projection = Projection, + ?UseDefaults = UseDefaults + ) + + + /// + /// Creates a Bubble3D plot. + /// + /// Bubble3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as points, additionally using the points size as a 4th dimension. + /// + /// Sets the x coordinates of the plotted data. + /// Sets the y coordinates of the plotted data. + /// Sets the z coordinates of the plotted data. + /// Sets the size of the points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// Sets the projection of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Bubble3D + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + z: seq<#IConvertible>, + sizes: seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol3D = MarkerSymbol, + ?MultiSymbol3D = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity, + MultiSize = sizes + ) + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initScatter3D ( + Trace3DStyle.Scatter3D( + X = x, + Y = y, + Z = z, + Mode = changeMode StyleParam.Mode.Markers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Projection = Projection, + Marker = marker + ) + ) + + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// Creates a Bubble3D plot from encoded x, y, and z coordinates. + [] + static member Bubble3D + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + zEncoded: EncodedTypedArray, + sizes: seq, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol3D = MarkerSymbol, + ?MultiSymbol3D = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity, + MultiSize = sizes + ) + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initScatter3D ( + Trace3DStyle.Scatter3D( + XEncoded = xEncoded, + YEncoded = yEncoded, + ZEncoded = zEncoded, + Mode = changeMode StyleParam.Mode.Markers, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Projection = Projection, + Marker = marker + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + + /// + /// Creates a Bubble3D plot. + /// + /// Bubble3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as points, additionally using the points size as a 4th dimension. + /// + /// Sets the x, y, and z coordinates of the plotted data. + /// Sets the size of the points + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// Sets the projection of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Bubble3D + ( + xyz, + sizes, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let x, y, z = Seq.unzip3 xyz + + Chart.Bubble3D( + x, + y, + z, + sizes, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?Projection = Projection, + ?UseDefaults = UseDefaults + + ) + + /// + /// Creates a Bubble3D plot. + /// + /// Bubble3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension as points, additionally using the points size as a 4th dimension. + /// + /// Sets the x, y, and z coordinates together with the point size. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// Sets the projection of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Bubble3D + ( + xyzsizes, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol3D, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?Projection: Projection, + ?UseDefaults: bool + ) = + + let x, y, z, sizes = + xyzsizes |> Seq.map (fun (x, _, _, _) -> x), + xyzsizes |> Seq.map (fun (_, y, _, _) -> y), + xyzsizes |> Seq.map (fun (_, _, z, _) -> z), + xyzsizes |> Seq.map (fun (_, _, _, size) -> size) + + Chart.Bubble3D( + x, + y, + z, + sizes, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?Projection = Projection, + ?UseDefaults = UseDefaults + + ) + diff --git a/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Surface.fs b/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Surface.fs new file mode 100644 index 00000000..93341efc --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Surface.fs @@ -0,0 +1,395 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +//open FSharp.Care.Collections + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module Chart3D_Surface = + + [] + type Chart = + /// + /// Creates a surface plot. + /// + /// Surface plots plot a z value as a function of x and y, creating a three-dimensional surface. + /// + /// The data the describes the coordinates of the surface is set in `z`. Data in `z` should be a 2D array. + /// Coordinates in `x` and `y` can either be 1D arrays or 2D arrays (e.g. to graph parametric surfaces). If not provided in `x` and `y`, the x and y coordinates are assumed to be linear starting at 0 with a unit step. + /// The color scale corresponds to the `z` values by default. For custom color scales, use `surfacecolor` which should be a 2D array, where its bounds can be controlled using `cmin` and `cmax`. + /// + /// Two-dimensional data array representing the surface's z values + /// Sets the x coordinates. + /// Sets the y coordinates. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the contours on the surface + /// Sets the colorscale of the surface + /// Whether or not to show the colorbar/colorscale + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Surface + ( + zData, + ?X: seq<#IConvertible>, + ?Y: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Contours: Contours, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initSurface ( + Trace3DStyle.Surface( + Z = zData, + ?X = X, + ?Y = Y, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Contours = Contours, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale + ) + ) + + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Creates a surface plot from an encoded z matrix and optional encoded x and y coordinates. + /// + [] + static member Surface + ( + zEncoded: EncodedTypedArray, + ?xEncoded: EncodedTypedArray, + ?yEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Contours: Contours, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initSurface ( + Trace3DStyle.Surface( + ZEncoded = zEncoded, + ?XEncoded = xEncoded, + ?YEncoded = yEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Contours = Contours, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Visualizes a 3D mesh. + /// + /// Draws sets of triangles with coordinates given by three 1-dimensional arrays in `x`, `y`, `z` and + /// + /// (1) a sets of `i`, `j`, `k` indices or + /// + /// (2) Delaunay triangulation or + /// + /// (3) the Alpha-shape algorithm or + /// + /// (4) the Convex-hull algorithm + /// + /// Sets the X coordinates of the vertices. The nth element of vectors `x`, `y` and `z` jointly represent the X, Y and Z coordinates of the nth vertex. + /// Sets the Y coordinates of the vertices. The nth element of vectors `x`, `y` and `z` jointly represent the X, Y and Z coordinates of the nth vertex. + /// Sets the Z coordinates of the vertices. The nth element of vectors `x`, `y` and `z` jointly represent the X, Y and Z coordinates of the nth vertex. + /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "first" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `i[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `i` represents a point in space, which is the first vertex of a triangle. + /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "second" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `j[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `j` represents a point in space, which is the second vertex of a triangle. + /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "third" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `k[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `k` represents a point in space, which is the third vertex of a triangle. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the whole mesh + /// Sets the style and visibility of contours + /// Sets the colorscale + /// Whether or not to show the colorbar/colorscale + /// Sets the colorbar + /// Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low-poly look via flat reflections. + /// Determines how the mesh surface triangles are derived from the set of vertices (points) represented by the `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays are not supplied. + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Mesh3D + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + z: seq<#IConvertible>, + ?I: seq<#IConvertible>, + ?J: seq<#IConvertible>, + ?K: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Color: Color, + ?Contour: Contour, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?FlatShading: bool, + ?TriangulationAlgorithm: StyleParam.TriangulationAlgorithm, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initMesh3D ( + Trace3DStyle.Mesh3D( + X = x, + Y = y, + Z = z, + ?I = I, + ?J = J, + ?K = K, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Color = Color, + ?Contour = Contour, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?FlatShading = FlatShading, + ?AlphaHull = TriangulationAlgorithm + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Visualizes a 3D mesh from encoded coordinate and optional encoded topology/intensity arrays. + /// + [] + static member Mesh3D + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + zEncoded: EncodedTypedArray, + ?iEncoded: EncodedTypedArray, + ?jEncoded: EncodedTypedArray, + ?kEncoded: EncodedTypedArray, + ?intensityEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Color: Color, + ?Contour: Contour, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?FlatShading: bool, + ?TriangulationAlgorithm: StyleParam.TriangulationAlgorithm, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initMesh3D ( + Trace3DStyle.Mesh3D( + XEncoded = xEncoded, + YEncoded = yEncoded, + ZEncoded = zEncoded, + ?IEncoded = iEncoded, + ?JEncoded = jEncoded, + ?KEncoded = kEncoded, + ?IntensityEncoded = intensityEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Color = Color, + ?Contour = Contour, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?FlatShading = FlatShading, + ?AlphaHull = TriangulationAlgorithm + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Visualizes a 3D mesh. + /// + /// Draws sets of triangles with coordinates given by three 1-dimensional arrays in `x`, `y`, `z` and + /// + /// (1) a sets of `i`, `j`, `k` indices or + /// + /// (2) Delaunay triangulation or + /// + /// (3) the Alpha-shape algorithm or + /// + /// (4) the Convex-hull algorithm + /// + /// Sets the X, Y, and Z coordinates of the vertices. The nth element of vectors `x`, `y` and `z` jointly represent the X, Y and Z coordinates of the nth vertex. + /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "first" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `i[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `i` represents a point in space, which is the first vertex of a triangle. + /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "second" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `j[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `j` represents a point in space, which is the second vertex of a triangle. + /// A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the "third" vertex of a triangle. For example, `{i[m], j[m], k[m]}` together represent face m (triangle m) in the mesh, where `k[m] = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `k` represents a point in space, which is the third vertex of a triangle. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the whole mesh + /// Sets the style and visibility of contours + /// Sets the colorscale + /// Whether or not to show the colorbar/colorscale + /// Sets the colorbar + /// Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low-poly look via flat reflections. + /// Determines how the mesh surface triangles are derived from the set of vertices (points) represented by the `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays are not supplied. + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Mesh3D + ( + xyz: seq<#IConvertible * #IConvertible * #IConvertible>, + ?I: seq<#IConvertible>, + ?J: seq<#IConvertible>, + ?K: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?Color: Color, + ?Contour: Contour, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?FlatShading: bool, + ?TriangulationAlgorithm: StyleParam.TriangulationAlgorithm, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let x, y, z = Seq.unzip3 xyz + + Chart.Mesh3D( + x, + y, + z, + ?I = I, + ?J = J, + ?K = K, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Color = Color, + ?Contour = Contour, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?FlatShading = FlatShading, + ?TriangulationAlgorithm = TriangulationAlgorithm, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?UseDefaults = UseDefaults + ) + diff --git a/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_VectorField.fs b/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_VectorField.fs new file mode 100644 index 00000000..86b3f1c6 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_VectorField.fs @@ -0,0 +1,628 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +//open FSharp.Care.Collections + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module Chart3D_VectorField = + + [] + type Chart = + /// + /// Creates a cone plot, typically used to visualize vector fields. + /// + /// Specify a vector field using 6 1D arrays: + /// + /// 3 position arrays `x`, `y` and `z` and + /// + /// 3 vector component arrays `u`, `v`, `w`. + /// + /// The cones are drawn exactly at the positions given by `x`, `y` and `z`. + /// + /// Sets the x coordinates of the vector field and of the displayed cones. + /// Sets the y coordinates of the vector field and of the displayed cones. + /// Sets the z coordinates of the vector field and of the displayed cones. + /// Sets the x components of the vector field. + /// Sets the y components of the vector field. + /// Sets the z components of the vector field. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorscale + /// Whether or not to show the colorbar/colorscale + /// Sets the colorbar + /// Determines whether `sizeref` is set as a "scaled" (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as "absolute" value (in the same units as the vector field). + /// Sets the cones' anchor with respect to their x/y/z positions. Note that "cm" denote the cone's center of mass which corresponds to 1/4 from the tail to tip. + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Cone + ( + x: seq<#IConvertible>, + y: seq<#IConvertible>, + z: seq<#IConvertible>, + u: seq<#IConvertible>, + v: seq<#IConvertible>, + w: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?SizeMode: StyleParam.ConeSizeMode, + ?ConeAnchor: StyleParam.ConeAnchor, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initCone ( + Trace3DStyle.Cone( + X = x, + Y = y, + Z = z, + U = u, + V = v, + W = w, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?SizeMode = SizeMode, + ?Anchor = ConeAnchor + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Creates a cone plot from encoded vector-field coordinates and components. + /// + [] + static member Cone + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + zEncoded: EncodedTypedArray, + uEncoded: EncodedTypedArray, + vEncoded: EncodedTypedArray, + wEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?SizeMode: StyleParam.ConeSizeMode, + ?ConeAnchor: StyleParam.ConeAnchor, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initCone ( + Trace3DStyle.Cone( + XEncoded = xEncoded, + YEncoded = yEncoded, + ZEncoded = zEncoded, + UEncoded = uEncoded, + VEncoded = vEncoded, + WEncoded = wEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?SizeMode = SizeMode, + ?Anchor = ConeAnchor + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Creates a cone plot, typically used to visualize vector fields. + /// + /// Specify a vector field using 6 1D arrays: + /// + /// 3 position arrays `x`, `y` and `z` and + /// + /// 3 vector component arrays `u`, `v`, `w`. + /// + /// The cones are drawn exactly at the positions given by `x`, `y` and `z`. + /// + /// Sets the x, y, and z coordinates of the vector field and of the displayed cones. + /// Sets the x, y, and z components of the vector field. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorscale + /// Whether or not to show the colorbar/colorscale + /// Sets the colorbar + /// Determines whether `sizeref` is set as a "scaled" (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as "absolute" value (in the same units as the vector field). + /// Sets the cones' anchor with respect to their x/y/z positions. Note that "cm" denote the cone's center of mass which corresponds to 1/4 from the tail to tip. + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Cone + ( + coneXYZ: seq<#IConvertible * #IConvertible * #IConvertible>, + coneUVW: seq<#IConvertible * #IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?SizeMode: StyleParam.ConeSizeMode, + ?ConeAnchor: StyleParam.ConeAnchor, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let x, y, z = Seq.unzip3 coneXYZ + let u, v, w = Seq.unzip3 coneUVW + + Chart.Cone( + x, + y, + z, + u, + v, + w, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?SizeMode = SizeMode, + ?ConeAnchor = ConeAnchor, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a cone plot, typically used to visualize vector fields. + /// + /// Specify a vector field using 6 1D arrays: + /// + /// 3 position arrays `x`, `y` and `z` and + /// + /// 3 vector component arrays `u`, `v`, `w`. + /// + /// The cones are drawn exactly at the positions given by `x`, `y` and `z`. + /// + /// Sets the x, y, and z coordinates of the vector field and of the displayed cones together with the x, y, and z components of the vector field. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorscale + /// Whether or not to show the colorbar/colorscale + /// Sets the colorbar + /// Determines whether `sizeref` is set as a "scaled" (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as "absolute" value (in the same units as the vector field). + /// Sets the cones' anchor with respect to their x/y/z positions. Note that "cm" denote the cone's center of mass which corresponds to 1/4 from the tail to tip. + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Cone + ( + xyzuvw: + seq<#IConvertible * #IConvertible * #IConvertible * #IConvertible * #IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?SizeMode: StyleParam.ConeSizeMode, + ?ConeAnchor: StyleParam.ConeAnchor, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let x, y, z, u, v, w = + xyzuvw |> Seq.map (fun (x, _, _, _, _, _) -> x), + xyzuvw |> Seq.map (fun (_, y, _, _, _, _) -> y), + xyzuvw |> Seq.map (fun (_, _, z, _, _, _) -> z), + xyzuvw |> Seq.map (fun (_, _, _, u, _, _) -> u), + xyzuvw |> Seq.map (fun (_, _, _, _, v, _) -> v), + xyzuvw |> Seq.map (fun (_, _, _, _, _, w) -> w) + + Chart.Cone( + x, + y, + z, + u, + v, + w, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?SizeMode = SizeMode, + ?ConeAnchor = ConeAnchor, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a streamtube plot, typically used to visualize flow in a vector field. + /// + /// Specify a vector field using 6 1D arrays of equal length: + /// + /// 3 position arrays `x`, `y` and `z` and + /// + /// 3 vector component arrays `u`, `v`, and `w`. + /// + /// By default, the tubes' starting positions will be cut from the vector field's x-z plane at its minimum y value. + /// To specify your own starting position, use `TubeStarts`. + /// The color is encoded by the norm of (u, v, w), and the local radius by the divergence of (u, v, w). + /// + /// Sets the x coordinates of the vector field and of the displayed cones. + /// Sets the y coordinates of the vector field and of the displayed cones. + /// Sets the z coordinates of the vector field and of the displayed cones. + /// Sets the x components of the vector field. + /// Sets the y components of the vector field. + /// Sets the z components of the vector field. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorscale + /// Whether or not to show the colorbar/colorscale + /// Sets the colorbar + /// The maximum number of displayed segments in a streamtube. + /// Use this object to specify custom tube start positions + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member StreamTube + ( + x, + y, + z, + u, + v, + w, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?MaxDisplayed: int, + ?TubeStarts: StreamTubeStarts, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initStreamTube ( + Trace3DStyle.StreamTube( + X = x, + Y = y, + Z = z, + U = u, + V = v, + W = w, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?MaxDisplayed = MaxDisplayed, + ?Starts = TubeStarts + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Creates a streamtube plot from encoded vector-field coordinates and components. + /// + [] + static member StreamTube + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + zEncoded: EncodedTypedArray, + uEncoded: EncodedTypedArray, + vEncoded: EncodedTypedArray, + wEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?MaxDisplayed: int, + ?TubeStarts: StreamTubeStarts, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initStreamTube ( + Trace3DStyle.StreamTube( + XEncoded = xEncoded, + YEncoded = yEncoded, + ZEncoded = zEncoded, + UEncoded = uEncoded, + VEncoded = vEncoded, + WEncoded = wEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?MaxDisplayed = MaxDisplayed, + ?Starts = TubeStarts + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Creates a streamtube plot, typically used to visualize flow in a vector field. + /// + /// Specify a vector field using 6 1D arrays of equal length: + /// + /// 3 position arrays `x`, `y` and `z` and + /// + /// 3 vector component arrays `u`, `v`, and `w`. + /// + /// By default, the tubes' starting positions will be cut from the vector field's x-z plane at its minimum y value. + /// To specify your own starting position, use `TubeStarts`. + /// The color is encoded by the norm of (u, v, w), and the local radius by the divergence of (u, v, w). + /// + /// Sets the x, y, and z coordinates of the vector field and of the displayed cones. + /// Sets the x, y, and z components of the vector field. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorscale + /// Whether or not to show the colorbar/colorscale + /// Sets the colorbar + /// The maximum number of displayed segments in a streamtube. + /// Use this object to specify custom tube start positions + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member StreamTube + ( + streamTubeXYZ: seq<#IConvertible * #IConvertible * #IConvertible>, + streamTubeUVW: seq<#IConvertible * #IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?MaxDisplayed: int, + ?TubeStarts: StreamTubeStarts, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let x, y, z = Seq.unzip3 streamTubeXYZ + let u, v, w = Seq.unzip3 streamTubeUVW + + Chart.StreamTube( + x, + y, + z, + u, + v, + w, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?MaxDisplayed = MaxDisplayed, + ?TubeStarts = TubeStarts, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?UseDefaults = UseDefaults + + ) + + /// + /// Creates a streamtube plot, typically used to visualize flow in a vector field. + /// + /// Specify a vector field using 6 1D arrays of equal length: + /// + /// 3 position arrays `x`, `y` and `z` and + /// + /// 3 vector component arrays `u`, `v`, and `w`. + /// + /// By default, the tubes' starting positions will be cut from the vector field's x-z plane at its minimum y value. + /// To specify your own starting position, use `TubeStarts`. + /// The color is encoded by the norm of (u, v, w), and the local radius by the divergence of (u, v, w). + /// + /// Sets the x, y, and z coordinates of the vector field and of the displayed cones together with the x, y, and z components of the vector field. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorscale + /// Whether or not to show the colorbar/colorscale + /// Sets the colorbar + /// The maximum number of displayed segments in a streamtube. + /// Use this object to specify custom tube start positions + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member StreamTube + ( + xyzuvw: + seq<#IConvertible * #IConvertible * #IConvertible * #IConvertible * #IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?MaxDisplayed: int, + ?TubeStarts: StreamTubeStarts, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let x, y, z, u, v, w = + xyzuvw |> Seq.map (fun (x, _, _, _, _, _) -> x), + xyzuvw |> Seq.map (fun (_, y, _, _, _, _) -> y), + xyzuvw |> Seq.map (fun (_, _, z, _, _, _) -> z), + xyzuvw |> Seq.map (fun (_, _, _, u, _, _) -> u), + xyzuvw |> Seq.map (fun (_, _, _, _, v, _) -> v), + xyzuvw |> Seq.map (fun (_, _, _, _, _, w) -> w) + + Chart.StreamTube( + x, + y, + z, + u, + v, + w, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?MaxDisplayed = MaxDisplayed, + ?TubeStarts = TubeStarts, + ?CameraProjectionType = CameraProjectionType, + ?Camera = Camera, + ?UseDefaults = UseDefaults + + ) + diff --git a/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Volume.fs b/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Volume.fs new file mode 100644 index 00000000..39a98a43 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/Chart3D/Chart3D_Volume.fs @@ -0,0 +1,338 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO +//open FSharp.Care.Collections + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module Chart3D_Volume = + + [] + type Chart = + /// + /// Creates a volume plot to visualize the volume of a 3D shape. + /// + /// Draws volume trace between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex of a uniform or non-uniform 3-D grid. + /// Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace. + /// + /// This plot is very similar to the `IsoSurface` plot. However, whereas isosurface plots show all surfaces with the same opacity, tweaking the opacityscale parameter of Volume plots results in a depth effect and better volume rendering. + /// + /// Sets the X coordinates of the vertices on X axis. + /// Sets the Y coordinates of the vertices on Y axis. + /// Sets the Z coordinates of the vertices on Z axis. + /// Sets the 4th dimension (value) of the vertices. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorscale + /// Whether or not to show the colorbar/colorscale + /// Sets the colorbar + /// Sets the minimum boundary for iso-surface plot. + /// Sets the maximum boundary for iso-surface plot. + /// Sets the caps (color-coded surfaces on the sides of the visualization domain) + /// Adds Slices through the volume + /// Sets the surface. + /// Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower values would have higher opacity values and those in the middle would be more transparent Alternatively, `opacityscale` may be a palette name string of the following list: 'min', 'max', 'extremes' and 'uniform'. The default is 'uniform'. + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Volume + ( + x, + y, + z, + value, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?IsoMin: float, + ?IsoMax: float, + ?Caps: Caps, + ?Slices: Slices, + ?Surface: Surface, + ?OpacityScale: seq<#seq<#IConvertible>>, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initVolume ( + Trace3DStyle.Volume( + X = x, + Y = y, + Z = z, + Value = value, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?IsoMin = IsoMin, + ?IsoMax = IsoMax, + ?Caps = Caps, + ?Slices = Slices, + ?Surface = Surface, + ?OpacityScale = OpacityScale + ) + ) + + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Creates a volume plot from encoded coordinate and value arrays. + /// + [] + static member Volume + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + zEncoded: EncodedTypedArray, + valueEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?IsoMin: float, + ?IsoMax: float, + ?Caps: Caps, + ?Slices: Slices, + ?Surface: Surface, + ?OpacityScaleEncoded: EncodedTypedArray, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initVolume ( + Trace3DStyle.Volume( + XEncoded = xEncoded, + YEncoded = yEncoded, + ZEncoded = zEncoded, + ValueEncoded = valueEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?IsoMin = IsoMin, + ?IsoMax = IsoMax, + ?Caps = Caps, + ?Slices = Slices, + ?Surface = Surface, + ?OpacityScaleEncoded = OpacityScaleEncoded + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Creates a isosurface plot to visualize the volume of a 3D shape. + /// + /// An isosurface is a surface that represents points of a constant value (e.g. pressure, temperature, velocity, density) within a volume of space. + /// + /// Draws isosurfaces between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex of a uniform or non-uniform 3-D grid. + /// Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace. + /// + /// This plot is very similar to the `Volume` plot. However it shows all surfaces with the same opacity. + /// + /// Sets the X coordinates of the vertices on X axis. + /// Sets the Y coordinates of the vertices on Y axis. + /// Sets the Z coordinates of the vertices on Z axis. + /// Sets the 4th dimension (value) of the vertices. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorscale + /// Whether or not to show the colorbar/colorscale + /// Sets the colorbar + /// Sets the minimum boundary for iso-surface plot. + /// Sets the maximum boundary for iso-surface plot. + /// Sets the caps (color-coded surfaces on the sides of the visualization domain) + /// Adds Slices through the volume + /// Sets the surface. + /// Sets the camera projection type of this trace. + /// Sets the camera of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member IsoSurface + ( + x, + y, + z, + value, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?IsoMin: float, + ?IsoMax: float, + ?Caps: Caps, + ?Slices: Slices, + ?Surface: Surface, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initIsoSurface ( + Trace3DStyle.IsoSurface( + X = x, + Y = y, + Z = z, + Value = value, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?IsoMin = IsoMin, + ?IsoMax = IsoMax, + ?Caps = Caps, + ?Slices = Slices, + ?Surface = Surface + + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) + + /// + /// Creates an isosurface plot from encoded coordinate and value arrays. + /// + [] + static member IsoSurface + ( + xEncoded: EncodedTypedArray, + yEncoded: EncodedTypedArray, + zEncoded: EncodedTypedArray, + valueEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ColorBar: ColorBar, + ?IsoMin: float, + ?IsoMax: float, + ?Caps: Caps, + ?Slices: Slices, + ?Surface: Surface, + ?CameraProjectionType: StyleParam.CameraProjectionType, + ?Camera: Camera, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let cameraProjection = + defaultArg CameraProjectionType StyleParam.CameraProjectionType.Perspective + + let camera = + Camera + |> Option.defaultValue (LayoutObjects.Camera.init ()) + |> LayoutObjects.Camera.style (Projection = CameraProjection.init (ProjectionType = cameraProjection)) + + Trace3D.initIsoSurface ( + Trace3DStyle.IsoSurface( + XEncoded = xEncoded, + YEncoded = yEncoded, + ZEncoded = zEncoded, + ValueEncoded = valueEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ColorBar = ColorBar, + ?IsoMin = IsoMin, + ?IsoMax = IsoMax, + ?Caps = Caps, + ?Slices = Slices, + ?Surface = Surface + + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout ( + Layout.init () |> Layout.setScene (StyleParam.SubPlotId.Scene 1, Scene.init (Camera = camera)) + ) diff --git a/src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Base.fs b/src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Base.fs new file mode 100644 index 00000000..408842cc --- /dev/null +++ b/src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Base.fs @@ -0,0 +1,160 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module ChartCarpet_Base = + + [] + type Chart = + /// + /// Creates a carpet in a 2D coordinate system to be used as additional coordinate system in a carpet plot. + /// + /// A carpet plot illustrates the interaction between two or more independent variables and one or more dependent variables in a two-dimensional plot. + /// Besides the ability to incorporate more variables, another feature that distinguishes a carpet plot from an equivalent contour plot or 3D surface plot is that a carpet plot can be used to more accurately interpolate data points. + /// A conventional carpet plot can capture the interaction of up to three independent variables and three dependent variables and still be easily read and interpolated. + /// + /// Three-variable carpet plot (cheater plot): + /// + /// A carpet plot with two independent variables and one dependent variable is often called a cheater plot for the use of a phantom "cheater" axis instead of the horizontal axis. As a result of this missing axis, the values can be shifted horizontally such that the intersections line up vertically. This allows easy interpolation by having fixed horizontal intervals correspond to fixed intervals in both independent variables. + /// + /// Four-variable carpet plot (true carpet plot) + /// + /// Instead of using the horizontal axis to adjust the plot perspective and align carpet intersections vertically, the horizontal axis can be used to show the effects on an additional dependent variable.[5] In this case the perspective is fixed, and any overlapping cannot be adjusted. Because a true carpet plot represents two independent variables and two dependent variables simultaneously, there is no corresponding way to show the information on a conventional contour plot or 3D surface plot. + /// + /// (from https://en.wikipedia.org/wiki/Carpet_plot @ 1/11/2021) + /// + /// An identifier for this carpet, so that `scattercarpet` and `contourcarpet` traces can specify a carpet plot on which they lie. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// A one dimensional array of x coordinates matching the dimensions of `a` and `b`. + /// A two dimensional array of x coordinates at each carpet point. If omitted, the plot is a cheater plot and the xaxis is hidden by default. + /// A one dimensional array of y coordinates matching the dimensions of `a` and `b`. + /// A two dimensional array of y coordinates at each carpet point. + /// An array containing values of the first parameter value + /// An array containing values of the second parameter value + /// Sets this carpet's a axis. + /// Sets this carpet's b axis. + /// Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. + /// Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. + /// Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this. + /// The shift applied to each successive row of data in creating a cheater plot. Only used if `x` is been omitted. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Carpet + ( + carpetId: string, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?X: seq<#IConvertible>, + ?MultiX: seq<#seq<#IConvertible>>, + ?Y: seq<#IConvertible>, + ?MultiY: seq<#seq<#IConvertible>>, + ?A: seq<#IConvertible>, + ?B: seq<#IConvertible>, + ?AAxis: LinearAxis, + ?BAxis: LinearAxis, + ?XAxis: StyleParam.LinearAxisId, + ?YAxis: StyleParam.LinearAxisId, + ?Color: Color, + ?CheaterSlope: float, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + TraceCarpet.initCarpet ( + TraceCarpetStyle.Carpet( + Carpet = StyleParam.SubPlotId.Carpet carpetId, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?X = X, + ?MultiX = MultiX, + ?Y = Y, + ?MultiY = MultiY, + ?A = A, + ?B = B, + ?AAxis = AAxis, + ?BAxis = BAxis, + ?XAxis = XAxis, + ?YAxis = YAxis, + ?Color = Color, + ?CheaterSlope = CheaterSlope + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a carpet in a 2D coordinate system from encoded parameter arrays. + /// + /// An identifier for this carpet, so that `scattercarpet` and `contourcarpet` traces can specify a carpet plot on which they lie. + /// An encoded array containing values of the first parameter value. + /// An encoded array containing values of the second parameter value. + /// A one dimensional or flattened encoded array of x coordinates matching the dimensions of `a` and `b`. + /// A one dimensional or flattened encoded array of y coordinates matching the dimensions of `a` and `b`. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets this carpet's a axis. + /// Sets this carpet's b axis. + /// Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. + /// Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. + /// Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this. + /// The shift applied to each successive row of data in creating a cheater plot. Only used if `x` is been omitted. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Carpet + ( + carpetId: string, + aEncoded: EncodedTypedArray, + bEncoded: EncodedTypedArray, + ?xEncoded: EncodedTypedArray, + ?yEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?AAxis: LinearAxis, + ?BAxis: LinearAxis, + ?XAxis: StyleParam.LinearAxisId, + ?YAxis: StyleParam.LinearAxisId, + ?Color: Color, + ?CheaterSlope: float, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + TraceCarpet.initCarpet ( + TraceCarpetStyle.Carpet( + Carpet = StyleParam.SubPlotId.Carpet carpetId, + AEncoded = aEncoded, + BEncoded = bEncoded, + ?XEncoded = xEncoded, + ?YEncoded = yEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?AAxis = AAxis, + ?BAxis = BAxis, + ?XAxis = XAxis, + ?YAxis = YAxis, + ?Color = Color, + ?CheaterSlope = CheaterSlope + ) + ) + |> GenericChart.ofTraceObject useDefaults + diff --git a/src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Contour.fs b/src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Contour.fs new file mode 100644 index 00000000..1e562d5d --- /dev/null +++ b/src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Contour.fs @@ -0,0 +1,308 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module ChartCarpet_Contour = + + [] + type Chart = + /// + /// Creates a contour chart that lies on a specified carpet. + /// + /// Plots contours on either the first carpet axis or the carpet axis with a matching `carpet` attribute. Data `z` is interpreted as matching that of the corresponding carpet axis. + /// + /// The identifier of the carpet that this trace will lie on. + /// Sets the z data. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the a coordinates. + /// Sets the b coordinates. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorbar of this trace. + /// Sets the colorscale of this trace. + /// Determines whether or not a colorbar is displayed for this trace. + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Transposes the z data. + /// Sets the contour line dash style + /// Sets the contour line color + /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. + /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). + /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. + /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. + /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. + /// Determines whether to label the contour lines with their values. + /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. + /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). + /// If set to false, ignore the global default settings set in `Defaults` + static member ContourCarpet + ( + z: seq<#IConvertible>, + carpetAnchorId: string, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?A: seq<#IConvertible>, + ?B: seq<#IConvertible>, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?Transpose: bool, + ?ContourLineColor: Color, + ?ContourLineDash: StyleParam.DrawingStyle, + ?ContourLineSmoothing: float, + ?ContourLine: Line, + ?ContoursColoring: StyleParam.ContourColoring, + ?ContoursOperation: StyleParam.ConstraintOperation, + ?ContoursType: StyleParam.ContourType, + ?ShowContourLabels: bool, + ?ContourLabelFont: Font, + ?Contours: Contours, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let line = + ContourLine + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = ContourLineColor, + ?Dash = ContourLineDash, + ?Smoothing = ContourLineSmoothing + ) + + let contours = + Contours + |> Option.defaultValue (TraceObjects.Contours.init ()) + |> TraceObjects.Contours.style ( + ?Coloring = ContoursColoring, + ?Operation = ContoursOperation, + ?Type = ContoursType, + ?ShowLabels = ShowContourLabels, + ?LabelFont = ContourLabelFont + ) + + TraceCarpet.initContourCarpet ( + TraceCarpetStyle.ContourCarpet( + Z = z, + ?A = A, + ?B = B, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?Transpose = Transpose, + Carpet = (carpetAnchorId |> StyleParam.SubPlotId.Carpet), + Contours = contours, + Line = line + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a contour chart that lies on a specified carpet from encoded z data. + /// + /// Sets the z data as an encoded typed array. + /// The identifier of the carpet that this trace will lie on. + /// Sets the a coordinates as an encoded typed array. + /// Sets the b coordinates as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorbar of this trace. + /// Sets the colorscale of this trace. + /// Determines whether or not a colorbar is displayed for this trace. + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Transposes the z data. + /// Sets the contour line dash style + /// Sets the contour line color + /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. + /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). + /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. + /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. + /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. + /// Determines whether to label the contour lines with their values. + /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. + /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). + /// If set to false, ignore the global default settings set in `Defaults` + static member ContourCarpet + ( + zEncoded: EncodedTypedArray, + carpetAnchorId: string, + ?aEncoded: EncodedTypedArray, + ?bEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?Transpose: bool, + ?ContourLineColor: Color, + ?ContourLineDash: StyleParam.DrawingStyle, + ?ContourLineSmoothing: float, + ?ContourLine: Line, + ?ContoursColoring: StyleParam.ContourColoring, + ?ContoursOperation: StyleParam.ConstraintOperation, + ?ContoursType: StyleParam.ContourType, + ?ShowContourLabels: bool, + ?ContourLabelFont: Font, + ?Contours: Contours, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let line = + ContourLine + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = ContourLineColor, + ?Dash = ContourLineDash, + ?Smoothing = ContourLineSmoothing + ) + + let contours = + Contours + |> Option.defaultValue (TraceObjects.Contours.init ()) + |> TraceObjects.Contours.style ( + ?Coloring = ContoursColoring, + ?Operation = ContoursOperation, + ?Type = ContoursType, + ?ShowLabels = ShowContourLabels, + ?LabelFont = ContourLabelFont + ) + + TraceCarpet.initContourCarpet ( + TraceCarpetStyle.ContourCarpet( + ZEncoded = zEncoded, + ?AEncoded = aEncoded, + ?BEncoded = bEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?Transpose = Transpose, + Carpet = (carpetAnchorId |> StyleParam.SubPlotId.Carpet), + Contours = contours, + Line = line + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a contour chart that lies on a specified carpet. + /// + /// Plots contours on either the first carpet axis or the carpet axis with a matching `carpet` attribute. Data `z` is interpreted as matching that of the corresponding carpet axis. + /// + /// The identifier of the carpet that this trace will lie on. + /// Sets the a and b coordinates together with the respective z value + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorbar of this trace. + /// Sets the colorscale of this trace. + /// Determines whether or not a colorbar is displayed for this trace. + /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. + /// Transposes the z data. + /// Sets the contour line dash style + /// Sets the contour line color + /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. + /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). + /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. + /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. + /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. + /// Determines whether to label the contour lines with their values. + /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. + /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). + /// If set to false, ignore the global default settings set in `Defaults` + static member ContourCarpet + ( + abz: seq<#IConvertible * #IConvertible * #IConvertible>, + carpetAnchorId: string, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?Transpose: bool, + ?ContourLineColor: Color, + ?ContourLineDash: StyleParam.DrawingStyle, + ?ContourLineSmoothing: float, + ?ContourLine: Line, + ?ContoursColoring: StyleParam.ContourColoring, + ?ContoursOperation: StyleParam.ConstraintOperation, + ?ContoursType: StyleParam.ContourType, + ?ShowContourLabels: bool, + ?ContourLabelFont: Font, + ?Contours: Contours, + ?UseDefaults: bool + ) = + + let a, b, z = Seq.unzip3 abz + + Chart.ContourCarpet( + z, + carpetAnchorId, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + A = a, + B = b, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?Transpose = Transpose, + ?ContourLineColor = ContourLineColor, + ?ContourLineDash = ContourLineDash, + ?ContourLineSmoothing = ContourLineSmoothing, + ?ContourLine = ContourLine, + ?ContoursColoring = ContoursColoring, + ?ContoursOperation = ContoursOperation, + ?ContoursType = ContoursType, + ?ShowContourLabels = ShowContourLabels, + ?ContourLabelFont = ContourLabelFont, + ?Contours = Contours, + ?UseDefaults = UseDefaults + ) diff --git a/src/Plotly.NET/ChartAPI/ChartCarpet.fs b/src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Scatter.fs similarity index 69% rename from src/Plotly.NET/ChartAPI/ChartCarpet.fs rename to src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Scatter.fs index aaf69e75..becfed44 100644 --- a/src/Plotly.NET/ChartAPI/ChartCarpet.fs +++ b/src/Plotly.NET/ChartAPI/ChartCarpet/ChartCarpet_Scatter.fs @@ -1,4 +1,4 @@ -namespace Plotly.NET +namespace Plotly.NET open Plotly.NET.LayoutObjects open Plotly.NET.TraceObjects @@ -12,153 +12,10 @@ open System.Runtime.InteropServices open System.Runtime.CompilerServices [] -module ChartCarpet = +module ChartCarpet_Scatter = [] type Chart = - - /// - /// Creates a carpet in a 2D coordinate system to be used as additional coordinate system in a carpet plot. - /// - /// A carpet plot illustrates the interaction between two or more independent variables and one or more dependent variables in a two-dimensional plot. - /// Besides the ability to incorporate more variables, another feature that distinguishes a carpet plot from an equivalent contour plot or 3D surface plot is that a carpet plot can be used to more accurately interpolate data points. - /// A conventional carpet plot can capture the interaction of up to three independent variables and three dependent variables and still be easily read and interpolated. - /// - /// Three-variable carpet plot (cheater plot): - /// - /// A carpet plot with two independent variables and one dependent variable is often called a cheater plot for the use of a phantom "cheater" axis instead of the horizontal axis. As a result of this missing axis, the values can be shifted horizontally such that the intersections line up vertically. This allows easy interpolation by having fixed horizontal intervals correspond to fixed intervals in both independent variables. - /// - /// Four-variable carpet plot (true carpet plot) - /// - /// Instead of using the horizontal axis to adjust the plot perspective and align carpet intersections vertically, the horizontal axis can be used to show the effects on an additional dependent variable.[5] In this case the perspective is fixed, and any overlapping cannot be adjusted. Because a true carpet plot represents two independent variables and two dependent variables simultaneously, there is no corresponding way to show the information on a conventional contour plot or 3D surface plot. - /// - /// (from https://en.wikipedia.org/wiki/Carpet_plot @ 1/11/2021) - /// - /// An identifier for this carpet, so that `scattercarpet` and `contourcarpet` traces can specify a carpet plot on which they lie. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// A one dimensional array of x coordinates matching the dimensions of `a` and `b`. - /// A two dimensional array of x coordinates at each carpet point. If omitted, the plot is a cheater plot and the xaxis is hidden by default. - /// A one dimensional array of y coordinates matching the dimensions of `a` and `b`. - /// A two dimensional array of y coordinates at each carpet point. - /// An array containing values of the first parameter value - /// An array containing values of the second parameter value - /// Sets this carpet's a axis. - /// Sets this carpet's b axis. - /// Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - /// Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - /// Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this. - /// The shift applied to each successive row of data in creating a cheater plot. Only used if `x` is been omitted. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Carpet - ( - carpetId: string, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?X: seq<#IConvertible>, - ?MultiX: seq<#seq<#IConvertible>>, - ?Y: seq<#IConvertible>, - ?MultiY: seq<#seq<#IConvertible>>, - ?A: seq<#IConvertible>, - ?B: seq<#IConvertible>, - ?AAxis: LinearAxis, - ?BAxis: LinearAxis, - ?XAxis: StyleParam.LinearAxisId, - ?YAxis: StyleParam.LinearAxisId, - ?Color: Color, - ?CheaterSlope: float, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - TraceCarpet.initCarpet ( - TraceCarpetStyle.Carpet( - Carpet = StyleParam.SubPlotId.Carpet carpetId, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?X = X, - ?MultiX = MultiX, - ?Y = Y, - ?MultiY = MultiY, - ?A = A, - ?B = B, - ?AAxis = AAxis, - ?BAxis = BAxis, - ?XAxis = XAxis, - ?YAxis = YAxis, - ?Color = Color, - ?CheaterSlope = CheaterSlope - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a carpet in a 2D coordinate system from encoded parameter arrays. - /// - /// An identifier for this carpet, so that `scattercarpet` and `contourcarpet` traces can specify a carpet plot on which they lie. - /// An encoded array containing values of the first parameter value. - /// An encoded array containing values of the second parameter value. - /// A one dimensional or flattened encoded array of x coordinates matching the dimensions of `a` and `b`. - /// A one dimensional or flattened encoded array of y coordinates matching the dimensions of `a` and `b`. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets this carpet's a axis. - /// Sets this carpet's b axis. - /// Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. - /// Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. - /// Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this. - /// The shift applied to each successive row of data in creating a cheater plot. Only used if `x` is been omitted. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Carpet - ( - carpetId: string, - aEncoded: EncodedTypedArray, - bEncoded: EncodedTypedArray, - ?xEncoded: EncodedTypedArray, - ?yEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?AAxis: LinearAxis, - ?BAxis: LinearAxis, - ?XAxis: StyleParam.LinearAxisId, - ?YAxis: StyleParam.LinearAxisId, - ?Color: Color, - ?CheaterSlope: float, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - TraceCarpet.initCarpet ( - TraceCarpetStyle.Carpet( - Carpet = StyleParam.SubPlotId.Carpet carpetId, - AEncoded = aEncoded, - BEncoded = bEncoded, - ?XEncoded = xEncoded, - ?YEncoded = yEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?AAxis = AAxis, - ?BAxis = BAxis, - ?XAxis = XAxis, - ?YAxis = YAxis, - ?Color = Color, - ?CheaterSlope = CheaterSlope - ) - ) - |> GenericChart.ofTraceObject useDefaults - /// /// Creates a scatter plot that lies on a specified carpet. /// @@ -1473,293 +1330,3 @@ module ChartCarpet = ) - /// - /// Creates a contour chart that lies on a specified carpet. - /// - /// Plots contours on either the first carpet axis or the carpet axis with a matching `carpet` attribute. Data `z` is interpreted as matching that of the corresponding carpet axis. - /// - /// The identifier of the carpet that this trace will lie on. - /// Sets the z data. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the a coordinates. - /// Sets the b coordinates. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorbar of this trace. - /// Sets the colorscale of this trace. - /// Determines whether or not a colorbar is displayed for this trace. - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Transposes the z data. - /// Sets the contour line dash style - /// Sets the contour line color - /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. - /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). - /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. - /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. - /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. - /// Determines whether to label the contour lines with their values. - /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. - /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). - /// If set to false, ignore the global default settings set in `Defaults` - static member ContourCarpet - ( - z: seq<#IConvertible>, - carpetAnchorId: string, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?A: seq<#IConvertible>, - ?B: seq<#IConvertible>, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?Transpose: bool, - ?ContourLineColor: Color, - ?ContourLineDash: StyleParam.DrawingStyle, - ?ContourLineSmoothing: float, - ?ContourLine: Line, - ?ContoursColoring: StyleParam.ContourColoring, - ?ContoursOperation: StyleParam.ConstraintOperation, - ?ContoursType: StyleParam.ContourType, - ?ShowContourLabels: bool, - ?ContourLabelFont: Font, - ?Contours: Contours, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let line = - ContourLine - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = ContourLineColor, - ?Dash = ContourLineDash, - ?Smoothing = ContourLineSmoothing - ) - - let contours = - Contours - |> Option.defaultValue (TraceObjects.Contours.init ()) - |> TraceObjects.Contours.style ( - ?Coloring = ContoursColoring, - ?Operation = ContoursOperation, - ?Type = ContoursType, - ?ShowLabels = ShowContourLabels, - ?LabelFont = ContourLabelFont - ) - - TraceCarpet.initContourCarpet ( - TraceCarpetStyle.ContourCarpet( - Z = z, - ?A = A, - ?B = B, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?Transpose = Transpose, - Carpet = (carpetAnchorId |> StyleParam.SubPlotId.Carpet), - Contours = contours, - Line = line - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a contour chart that lies on a specified carpet from encoded z data. - /// - /// Sets the z data as an encoded typed array. - /// The identifier of the carpet that this trace will lie on. - /// Sets the a coordinates as an encoded typed array. - /// Sets the b coordinates as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorbar of this trace. - /// Sets the colorscale of this trace. - /// Determines whether or not a colorbar is displayed for this trace. - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Transposes the z data. - /// Sets the contour line dash style - /// Sets the contour line color - /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. - /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). - /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. - /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. - /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. - /// Determines whether to label the contour lines with their values. - /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. - /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). - /// If set to false, ignore the global default settings set in `Defaults` - static member ContourCarpet - ( - zEncoded: EncodedTypedArray, - carpetAnchorId: string, - ?aEncoded: EncodedTypedArray, - ?bEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?Transpose: bool, - ?ContourLineColor: Color, - ?ContourLineDash: StyleParam.DrawingStyle, - ?ContourLineSmoothing: float, - ?ContourLine: Line, - ?ContoursColoring: StyleParam.ContourColoring, - ?ContoursOperation: StyleParam.ConstraintOperation, - ?ContoursType: StyleParam.ContourType, - ?ShowContourLabels: bool, - ?ContourLabelFont: Font, - ?Contours: Contours, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let line = - ContourLine - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = ContourLineColor, - ?Dash = ContourLineDash, - ?Smoothing = ContourLineSmoothing - ) - - let contours = - Contours - |> Option.defaultValue (TraceObjects.Contours.init ()) - |> TraceObjects.Contours.style ( - ?Coloring = ContoursColoring, - ?Operation = ContoursOperation, - ?Type = ContoursType, - ?ShowLabels = ShowContourLabels, - ?LabelFont = ContourLabelFont - ) - - TraceCarpet.initContourCarpet ( - TraceCarpetStyle.ContourCarpet( - ZEncoded = zEncoded, - ?AEncoded = aEncoded, - ?BEncoded = bEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?Transpose = Transpose, - Carpet = (carpetAnchorId |> StyleParam.SubPlotId.Carpet), - Contours = contours, - Line = line - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a contour chart that lies on a specified carpet. - /// - /// Plots contours on either the first carpet axis or the carpet axis with a matching `carpet` attribute. Data `z` is interpreted as matching that of the corresponding carpet axis. - /// - /// The identifier of the carpet that this trace will lie on. - /// Sets the a and b coordinates together with the respective z value - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorbar of this trace. - /// Sets the colorscale of this trace. - /// Determines whether or not a colorbar is displayed for this trace. - /// Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color. - /// Transposes the z data. - /// Sets the contour line dash style - /// Sets the contour line color - /// Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing. - /// Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments). - /// Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace. - /// Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms. - /// If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters. - /// Determines whether to label the contour lines with their values. - /// Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`. - /// Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments). - /// If set to false, ignore the global default settings set in `Defaults` - static member ContourCarpet - ( - abz: seq<#IConvertible * #IConvertible * #IConvertible>, - carpetAnchorId: string, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?Transpose: bool, - ?ContourLineColor: Color, - ?ContourLineDash: StyleParam.DrawingStyle, - ?ContourLineSmoothing: float, - ?ContourLine: Line, - ?ContoursColoring: StyleParam.ContourColoring, - ?ContoursOperation: StyleParam.ConstraintOperation, - ?ContoursType: StyleParam.ContourType, - ?ShowContourLabels: bool, - ?ContourLabelFont: Font, - ?Contours: Contours, - ?UseDefaults: bool - ) = - - let a, b, z = Seq.unzip3 abz - - Chart.ContourCarpet( - z, - carpetAnchorId, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - A = a, - B = b, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?Transpose = Transpose, - ?ContourLineColor = ContourLineColor, - ?ContourLineDash = ContourLineDash, - ?ContourLineSmoothing = ContourLineSmoothing, - ?ContourLine = ContourLine, - ?ContoursColoring = ContoursColoring, - ?ContoursOperation = ContoursOperation, - ?ContoursType = ContoursType, - ?ShowContourLabels = ShowContourLabels, - ?ContourLabelFont = ContourLabelFont, - ?Contours = Contours, - ?UseDefaults = UseDefaults - ) diff --git a/src/Plotly.NET/ChartAPI/ChartDomain.fs b/src/Plotly.NET/ChartAPI/ChartDomain.fs deleted file mode 100644 index c4951062..00000000 --- a/src/Plotly.NET/ChartAPI/ChartDomain.fs +++ /dev/null @@ -1,2701 +0,0 @@ -namespace Plotly.NET - -open Plotly.NET.LayoutObjects -open Plotly.NET.TraceObjects - -open DynamicObj -open System -open System.IO - -open StyleParam -open System.Runtime.InteropServices -open System.Runtime.CompilerServices - -[] -module ChartDomain = - - [] - type Chart = - - /// - /// Creates a pie chart. - /// - /// A pie chart (or a circle chart) is a circular statistical graphic, which is divided into slices to illustrate numerical proportion. - /// In a pie chart, the arc length of each slice (and consequently its central angle and area), is proportional to the quantity it represents. - /// - /// Sets the values of the sectors - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets the sector labels. If `labels` entries are duplicated, the associated `values` are summed. - /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. - /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// Specifies the direction at which succeeding sectors follow one another. - /// Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart. - /// Instead of the first slice starting at 12 o'clock, rotate to some other angle. - /// Determines whether or not the sectors are reordered from largest to smallest. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Pie - ( - values: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Labels: seq<#IConvertible>, - ?Pull: float, - ?MultiPull: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?Direction: StyleParam.Direction, - ?Hole: float, - ?Rotation: float, - ?Sort: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let outline = - SectionOutline - |> Option.defaultValue (Line.init ()) - |> Line.style ( - ?Color = SectionOutlineColor, - ?Width = SectionOutlineWidth, - ?MultiWidth = SectionOutlineMultiWidth - ) - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style (?Colors = SectionColors, ?MultiOpacity = MultiOpacity, Outline = outline, Pattern = pattern) - - - TraceDomain.initPie ( - TraceDomainStyle.Pie( - Values = values, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Labels = Labels, - ?Pull = Pull, - ?MultiPull = MultiPull, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - Marker = marker, - ?TextInfo = TextInfo, - ?Direction = Direction, - ?Hole = Hole, - ?Rotation = Rotation, - ?Sort = Sort - - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a pie chart from encoded values and labels. - /// - /// Sets the values of the sectors as an encoded typed array. - /// Sets the sector labels as an encoded typed array. If `labels` entries are duplicated, the associated `values` are summed. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. - /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each bar - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// Specifies the direction at which succeeding sectors follow one another. - /// Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart. - /// Instead of the first slice starting at 12 o'clock, rotate to some other angle. - /// Determines whether or not the sectors are reordered from largest to smallest. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Pie - ( - valuesEncoded: EncodedTypedArray, - ?labelsEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Pull: float, - ?MultiPull: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?Direction: StyleParam.Direction, - ?Hole: float, - ?Rotation: float, - ?Sort: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let outline = - SectionOutline - |> Option.defaultValue (Line.init ()) - |> Line.style ( - ?Color = SectionOutlineColor, - ?Width = SectionOutlineWidth, - ?MultiWidth = SectionOutlineMultiWidth - ) - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style (?Colors = SectionColors, ?MultiOpacity = MultiOpacity, Outline = outline, Pattern = pattern) - - - TraceDomain.initPie ( - TraceDomainStyle.Pie( - ValuesEncoded = valuesEncoded, - ?LabelsEncoded = labelsEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Pull = Pull, - ?MultiPull = MultiPull, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - Marker = marker, - ?TextInfo = TextInfo, - ?Direction = Direction, - ?Hole = Hole, - ?Rotation = Rotation, - ?Sort = Sort - - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a pie chart. - /// - /// A pie chart (or a circle chart) is a circular statistical graphic, which is divided into slices to illustrate numerical proportion. - /// In a pie chart, the arc length of each slice (and consequently its central angle and area), is proportional to the quantity it represents. - /// - /// Sets the values and labels of the sectors. If label entries are duplicated, the associated values are summed. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. - /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// Specifies the direction at which succeeding sectors follow one another. - /// Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart. - /// Instead of the first slice starting at 12 o'clock, rotate to some other angle. - /// Determines whether or not the sectors are reordered from largest to smallest. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Pie - ( - valuesLabels: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Pull: float, - ?MultiPull: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?Direction: StyleParam.Direction, - ?Hole: float, - ?Rotation: float, - ?Sort: bool, - ?UseDefaults: bool - ) = - - let values, labels = Seq.unzip valuesLabels - - Chart.Pie( - values, - Labels = labels, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Pull = Pull, - ?MultiPull = MultiPull, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?SectionColors = SectionColors, - ?SectionOutlineColor = SectionOutlineColor, - ?SectionOutlineWidth = SectionOutlineWidth, - ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, - ?SectionOutline = SectionOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?TextInfo = TextInfo, - ?Direction = Direction, - ?Hole = Hole, - ?Rotation = Rotation, - ?Sort = Sort, - ?UseDefaults = UseDefaults - ) - - - /// - /// Creates a doughnut chart. - /// - /// A doughnut chart is a variation of the pie chart that has a fraction cut from the center of the slices. - /// - /// Sets the values of the sectors - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets the sector labels. If `labels` entries are duplicated, the associated `values` are summed. - /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. - /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// Specifies the direction at which succeeding sectors follow one another. - /// Instead of the first slice starting at 12 o'clock, rotate to some other angle. - /// Determines whether or not the sectors are reordered from largest to smallest. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Doughnut - ( - values: seq<#IConvertible>, - ?Name: string, - ?Hole: float, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Labels: seq<#IConvertible>, - ?Pull: float, - ?MultiPull: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?Direction: StyleParam.Direction, - ?Rotation: float, - ?Sort: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let hole = Option.defaultValue 0.4 Hole - - Chart.Pie( - values, - Hole = hole, - ?Labels = Labels, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?MultiPull = MultiPull, - ?Pull = Pull, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?SectionColors = SectionColors, - ?SectionOutlineColor = SectionOutlineColor, - ?SectionOutlineWidth = SectionOutlineWidth, - ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, - ?SectionOutline = SectionOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?TextInfo = TextInfo, - ?Direction = Direction, - ?Rotation = Rotation, - ?Sort = Sort, - ?UseDefaults = UseDefaults - ) - - /// Creates a doughnut chart from encoded values and labels. - [] - static member Doughnut - ( - valuesEncoded: EncodedTypedArray, - ?labelsEncoded: EncodedTypedArray, - ?Hole: float, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Pull: float, - ?MultiPull: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?Direction: StyleParam.Direction, - ?Rotation: float, - ?Sort: bool, - ?UseDefaults: bool - ) = - - let hole = Option.defaultValue 0.4 Hole - - Chart.Pie( - valuesEncoded, - ?labelsEncoded = labelsEncoded, - Hole = hole, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?MultiPull = MultiPull, - ?Pull = Pull, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?SectionColors = SectionColors, - ?SectionOutlineColor = SectionOutlineColor, - ?SectionOutlineWidth = SectionOutlineWidth, - ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, - ?SectionOutline = SectionOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?TextInfo = TextInfo, - ?Direction = Direction, - ?Rotation = Rotation, - ?Sort = Sort, - ?UseDefaults = UseDefaults - ) - - - /// - /// Creates a doughnut chart. - /// - /// A doughnut chart is a variation of the pie chart that has a fraction cut from the center of the slices. - /// - /// Sets the values and labels of the sectors. If label entries are duplicated, the associated values are summed. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. - /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// Specifies the direction at which succeeding sectors follow one another. - /// Instead of the first slice starting at 12 o'clock, rotate to some other angle. - /// Determines whether or not the sectors are reordered from largest to smallest. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Doughnut - ( - valuesLabels: seq<#IConvertible * #IConvertible>, - ?Hole: float, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Pull: float, - ?MultiPull: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?Direction: StyleParam.Direction, - ?Rotation: float, - ?Sort: bool, - ?UseDefaults: bool - ) = - let values, labels = Seq.unzip valuesLabels - - Chart.Doughnut( - values, - Labels = labels, - ?Hole = Hole, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Pull = Pull, - ?MultiPull = MultiPull, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?SectionColors = SectionColors, - ?SectionOutlineColor = SectionOutlineColor, - ?SectionOutlineWidth = SectionOutlineWidth, - ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, - ?SectionOutline = SectionOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?TextInfo = TextInfo, - ?Direction = Direction, - ?Rotation = Rotation, - ?Sort = Sort, - ?UseDefaults = UseDefaults - ) - - - - /// - /// Creates a FunnelArea chart. - /// - /// FunnelArea charts visualize stages in a process using area-encoded trapezoids, which can be used to show data in a part-to-whole representation similar to a piechart, - /// wherein each item appears in a single stage. See also the "funnel" chart for a different approach to visualizing funnel data. - /// - /// Sets the values of the sectors - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets the sector labels. If `labels` entries are duplicated, the associated `values` are summed. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// - /// - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member FunnelArea - ( - values: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Labels: seq<#IConvertible>, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?AspectRatio: float, - ?BaseRatio: float, - ?UseDefaults: bool - ) = - - - let useDefaults = - defaultArg UseDefaults true - - let outline = - SectionOutline - |> Option.defaultValue (Line.init ()) - |> Line.style ( - ?Color = SectionOutlineColor, - ?Width = SectionOutlineWidth, - ?MultiWidth = SectionOutlineMultiWidth - ) - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style (?Colors = SectionColors, ?MultiOpacity = MultiOpacity, Outline = outline, Pattern = pattern) - - - TraceDomain.initFunnelArea ( - TraceDomainStyle.FunnelArea( - Values = values, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Labels = Labels, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - Marker = marker, - ?TextInfo = TextInfo, - ?AspectRatio = AspectRatio, - ?BaseRatio = BaseRatio - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a FunnelArea chart. - /// - /// FunnelArea charts visualize stages in a process using area-encoded trapezoids, which can be used to show data in a part-to-whole representation similar to a piechart, - /// wherein each item appears in a single stage. See also the "funnel" chart for a different approach to visualizing funnel data. - /// - /// Sets the values and labels of the sectors. If label entries are duplicated, the associated values are summed. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// - /// - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member FunnelArea - ( - valuesLabels: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?AspectRatio: float, - ?BaseRatio: float, - ?UseDefaults: bool - ) = - let values, labels = Seq.unzip valuesLabels - - Chart.FunnelArea( - values, - Labels = labels, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?SectionColors = SectionColors, - ?SectionOutlineColor = SectionOutlineColor, - ?SectionOutlineWidth = SectionOutlineWidth, - ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, - ?SectionOutline = SectionOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?TextInfo = TextInfo, - ?AspectRatio = AspectRatio, - ?BaseRatio = BaseRatio, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a FunnelArea chart from encoded values and optional encoded labels. - /// - /// FunnelArea charts visualize stages in a process using area-encoded trapezoids, which can be used to show data in a part-to-whole representation similar to a piechart, - /// wherein each item appears in a single stage. See also the "funnel" chart for a different approach to visualizing funnel data. - /// - /// Sets the values of the sectors as an encoded typed array. - /// Sets the sector labels as an encoded typed array. If label entries are duplicated, the associated values are summed. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// - /// - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member FunnelArea - ( - valuesEncoded: EncodedTypedArray, - ?labelsEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?AspectRatio: float, - ?BaseRatio: float, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let outline = - SectionOutline - |> Option.defaultValue (Line.init ()) - |> Line.style ( - ?Color = SectionOutlineColor, - ?Width = SectionOutlineWidth, - ?MultiWidth = SectionOutlineMultiWidth - ) - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style (?Colors = SectionColors, ?MultiOpacity = MultiOpacity, Outline = outline, Pattern = pattern) - - TraceDomain.initFunnelArea ( - TraceDomainStyle.FunnelArea( - ValuesEncoded = valuesEncoded, - ?LabelsEncoded = labelsEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - Marker = marker, - ?TextInfo = TextInfo, - ?AspectRatio = AspectRatio, - ?BaseRatio = BaseRatio - ) - ) - |> GenericChart.ofTraceObject useDefaults - - - /// - /// Creates a sunburst chart, which visualizes hierarchical data spanning outward radially from root to leaves. - /// - /// The hierarchy is defined by labels and parents attributes. The root starts from the center and children are added to the outer rings. - /// - /// Sets the labels of each of the sectors. - /// 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. - /// Sets the values associated with each of the sectors. - /// Assigns id labels to each datum. These ids for object constancy of data points during animation. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the colors associated with each section. - /// Sets the colorscale for the section values - /// Whether or not to show the section colorbar - /// Whether or not to show the section colorscale - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// 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. - /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. - /// Sets the styles for the root of this trace. - /// Sets the styles for the leaves of this trace. - /// 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`. - /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - /// Rotates the whole diagram counterclockwise by some angle. By default the first slice starts at 3 o'clock. - /// Determines whether or not the sectors are reordered from largest to smallest. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Sunburst - ( - labels: seq<#IConvertible>, - parents: seq<#IConvertible>, - ?Values: seq<#IConvertible>, - ?Ids: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?SectionColors: seq, - ?SectionColorScale: StyleParam.Colorscale, - ?ShowSectionColorScale: bool, - ?ReverseSectionColorScale: bool, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?BranchValues: StyleParam.BranchValues, - ?Count: string, - ?Root: SunburstRoot, - ?Leaf: SunburstLeaf, - ?Level: string, - ?MaxDepth: int, - ?Rotation: int, - ?Sort: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let outline = - SectionOutline - |> Option.defaultValue (Line.init ()) - |> Line.style ( - ?Color = SectionOutlineColor, - ?Width = SectionOutlineWidth, - ?MultiWidth = SectionOutlineMultiWidth - ) - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?MultiOpacity = MultiOpacity, - ?Colors = SectionColors, - ?Colorscale = SectionColorScale, - ?ShowScale = ShowSectionColorScale, - ?ReverseScale = ReverseSectionColorScale, - Outline = outline, - Pattern = pattern - ) - - TraceDomain.initSunburst ( - TraceDomainStyle.Sunburst( - Labels = labels, - Parents = parents, - Marker = marker, - ?Values = Values, - ?Ids = Ids, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextInfo = TextInfo, - ?Rotation = Rotation, - ?Sort = Sort, - ?BranchValues = BranchValues, - ?Count = Count, - ?Root = Root, - ?Leaf = Leaf, - ?Level = Level, - ?MaxDepth = MaxDepth - - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a sunburst chart from encoded labels and parents. - /// - /// Sets the labels of each of the sectors as an encoded typed array. - /// Sets the parent sectors for each of the sectors as an encoded typed array. - /// Sets the values associated with each of the sectors as an encoded typed array. - /// Assigns id labels to each datum as an encoded typed array. These ids for object constancy of data points during animation. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the colors associated with each section. - /// Sets the colorscale for the section values - /// Whether or not to show the section colorbar - /// Whether or not to show the section colorscale - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// 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. - /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. - /// Sets the styles for the root of this trace. - /// Sets the styles for the leaves of this trace. - /// 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`. - /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - /// Rotates the whole diagram counterclockwise by some angle. By default the first slice starts at 3 o'clock. - /// Determines whether or not the sectors are reordered from largest to smallest. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Sunburst - ( - labelsEncoded: EncodedTypedArray, - parentsEncoded: EncodedTypedArray, - ?valuesEncoded: EncodedTypedArray, - ?idsEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?SectionColors: seq, - ?SectionColorScale: StyleParam.Colorscale, - ?ShowSectionColorScale: bool, - ?ReverseSectionColorScale: bool, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?BranchValues: StyleParam.BranchValues, - ?Count: string, - ?Root: SunburstRoot, - ?Leaf: SunburstLeaf, - ?Level: string, - ?MaxDepth: int, - ?Rotation: int, - ?Sort: bool, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let outline = - SectionOutline - |> Option.defaultValue (Line.init ()) - |> Line.style ( - ?Color = SectionOutlineColor, - ?Width = SectionOutlineWidth, - ?MultiWidth = SectionOutlineMultiWidth - ) - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?MultiOpacity = MultiOpacity, - ?Colors = SectionColors, - ?Colorscale = SectionColorScale, - ?ShowScale = ShowSectionColorScale, - ?ReverseScale = ReverseSectionColorScale, - Outline = outline, - Pattern = pattern - ) - - TraceDomain.initSunburst ( - TraceDomainStyle.Sunburst( - LabelsEncoded = labelsEncoded, - ParentsEncoded = parentsEncoded, - Marker = marker, - ?ValuesEncoded = valuesEncoded, - ?IdsEncoded = idsEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextInfo = TextInfo, - ?Rotation = Rotation, - ?Sort = Sort, - ?BranchValues = BranchValues, - ?Count = Count, - ?Root = Root, - ?Leaf = Leaf, - ?Level = Level, - ?MaxDepth = MaxDepth - - ) - ) - |> GenericChart.ofTraceObject useDefaults - - - - /// - /// Creates a sunburst chart, which visualizes hierarchical data spanning outward radially from root to leaves. - /// - /// The hierarchy is defined by labels and parents attributes. The root starts from the center and children are added to the outer rings. - /// - /// Sets the labels of each of the sectors and their respective parent sector. - /// Sets the values associated with each of the sectors. - /// Assigns id labels to each datum. These ids for object constancy of data points during animation. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the colors associated with each section. - /// Sets the colorscale for the section values - /// Whether or not to show the section colorbar - /// Whether or not to show the section colorscale - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// 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. - /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. - /// Sets the styles for the root of this trace. - /// Sets the styles for the leaves of this trace. - /// 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`. - /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - /// Rotates the whole diagram counterclockwise by some angle. By default the first slice starts at 3 o'clock. - /// Determines whether or not the sectors are reordered from largest to smallest. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Sunburst - ( - labelsparents: seq<#IConvertible * #IConvertible>, - ?Values: seq<#IConvertible>, - ?Ids: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?SectionColors: seq, - ?SectionColorScale: StyleParam.Colorscale, - ?ShowSectionColorScale: bool, - ?ReverseSectionColorScale: bool, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?BranchValues: StyleParam.BranchValues, - ?Count: string, - ?Root: SunburstRoot, - ?Leaf: SunburstLeaf, - ?Level: string, - ?MaxDepth: int, - ?Rotation: int, - ?Sort: bool, - ?UseDefaults: bool - ) = - - let labels, parents = - Seq.unzip labelsparents - - Chart.Sunburst( - labels, - parents, - ?Values = Values, - ?Ids = Ids, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?SectionColors = SectionColors, - ?SectionColorScale = SectionColorScale, - ?ShowSectionColorScale = ShowSectionColorScale, - ?ReverseSectionColorScale = ReverseSectionColorScale, - ?SectionOutlineColor = SectionOutlineColor, - ?SectionOutlineWidth = SectionOutlineWidth, - ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, - ?SectionOutline = SectionOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?TextInfo = TextInfo, - ?BranchValues = BranchValues, - ?Count = Count, - ?Root = Root, - ?Leaf = Leaf, - ?Level = Level, - ?MaxDepth = MaxDepth, - ?Rotation = Rotation, - ?Sort = Sort, - ?UseDefaults = UseDefaults - ) - - - /// - /// 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. - /// - /// Sets the labels of each of the sectors. - /// 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. - /// Sets the values associated with each of the sectors. - /// Assigns id labels to each datum. These ids for object constancy of data points during animation. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the colorscale for the section values - /// Whether or not to show the section colorbar - /// Whether or not to show the section colorscale - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// 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. - /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. - /// Sets the tiling for this trace. - /// Sets the path bar for this trace. - /// Sets the styles for the root of this trace. - /// 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`. - /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Treemap - ( - labels: seq<#IConvertible>, - parents: seq<#IConvertible>, - ?Values: seq<#IConvertible>, - ?Ids: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionColorScale: StyleParam.Colorscale, - ?ShowSectionColorScale: bool, - ?ReverseSectionColorScale: bool, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?BranchValues: StyleParam.BranchValues, - ?Count: string, - ?Tiling: TreemapTiling, - ?PathBar: Pathbar, - ?Root: TreemapRoot, - ?Level: string, - ?MaxDepth: int, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let outline = - SectionOutline - |> Option.defaultValue (Line.init ()) - |> Line.style ( - ?Color = SectionOutlineColor, - ?Width = SectionOutlineWidth, - ?MultiWidth = SectionOutlineMultiWidth - ) - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?MultiOpacity = MultiOpacity, - ?Colors = SectionColors, - ?Colorscale = SectionColorScale, - ?ShowScale = ShowSectionColorScale, - ?ReverseScale = ReverseSectionColorScale, - Outline = outline, - Pattern = pattern - ) - - TraceDomain.initTreemap ( - TraceDomainStyle.Treemap( - Labels = labels, - Parents = parents, - Marker = marker, - ?Values = Values, - ?Ids = Ids, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?TextInfo = TextInfo, - ?BranchValues = BranchValues, - ?Count = Count, - ?Tiling = Tiling, - ?PathBar = PathBar, - ?Root = Root, - ?Level = Level, - ?MaxDepth = MaxDepth - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a treemap chart from encoded labels and parents. - /// - /// Sets the labels of each of the sectors as an encoded typed array. - /// Sets the parent sectors for each of the sectors as an encoded typed array. - /// Sets the values associated with each of the sectors as an encoded typed array. - /// Assigns id labels to each datum as an encoded typed array. These ids for object constancy of data points during animation. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the colorscale for the section values - /// Whether or not to show the section colorbar - /// Whether or not to show the section colorscale - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// 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. - /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. - /// Sets the tiling for this trace. - /// Sets the path bar for this trace. - /// Sets the styles for the root of this trace. - /// 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`. - /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Treemap - ( - labelsEncoded: EncodedTypedArray, - parentsEncoded: EncodedTypedArray, - ?valuesEncoded: EncodedTypedArray, - ?idsEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionColorScale: StyleParam.Colorscale, - ?ShowSectionColorScale: bool, - ?ReverseSectionColorScale: bool, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?BranchValues: StyleParam.BranchValues, - ?Count: string, - ?Tiling: TreemapTiling, - ?PathBar: Pathbar, - ?Root: TreemapRoot, - ?Level: string, - ?MaxDepth: int, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let outline = - SectionOutline - |> Option.defaultValue (Line.init ()) - |> Line.style ( - ?Color = SectionOutlineColor, - ?Width = SectionOutlineWidth, - ?MultiWidth = SectionOutlineMultiWidth - ) - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?MultiOpacity = MultiOpacity, - ?Colors = SectionColors, - ?Colorscale = SectionColorScale, - ?ShowScale = ShowSectionColorScale, - ?ReverseScale = ReverseSectionColorScale, - Outline = outline, - Pattern = pattern - ) - - TraceDomain.initTreemap ( - TraceDomainStyle.Treemap( - LabelsEncoded = labelsEncoded, - ParentsEncoded = parentsEncoded, - Marker = marker, - ?ValuesEncoded = valuesEncoded, - ?IdsEncoded = idsEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?TextInfo = TextInfo, - ?BranchValues = BranchValues, - ?Count = Count, - ?Tiling = Tiling, - ?PathBar = PathBar, - ?Root = Root, - ?Level = Level, - ?MaxDepth = MaxDepth - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// 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. - /// - /// Sets the labels of each of the sectors and their respective parent sector. - /// Sets the values associated with each of the sectors. - /// Assigns id labels to each datum. These ids for object constancy of data points during animation. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the colorscale for the section values - /// Whether or not to show the section colorbar - /// Whether or not to show the section colorscale - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// Determines which trace information appear on the graph. - /// 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. - /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. - /// Sets the tiling for this trace. - /// Sets the path bar for this trace. - /// Sets the styles for the root of this trace. - /// 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`. - /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Treemap - ( - labelsparents: seq<#IConvertible * #IConvertible>, - ?Values: seq<#IConvertible>, - ?Ids: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionColorScale: StyleParam.Colorscale, - ?ShowSectionColorScale: bool, - ?ReverseSectionColorScale: bool, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?TextInfo: StyleParam.TextInfo, - ?BranchValues: StyleParam.BranchValues, - ?Count: string, - ?Tiling: TreemapTiling, - ?PathBar: Pathbar, - ?Root: TreemapRoot, - ?Level: string, - ?MaxDepth: int, - ?UseDefaults: bool - ) = - - let labels, parents = - Seq.unzip labelsparents - - Chart.Treemap( - labels, - parents, - ?Values = Values, - ?Ids = Ids, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?SectionColors = SectionColors, - ?SectionColorScale = SectionColorScale, - ?ShowSectionColorScale = ShowSectionColorScale, - ?ReverseSectionColorScale = ReverseSectionColorScale, - ?SectionOutlineColor = SectionOutlineColor, - ?SectionOutlineWidth = SectionOutlineWidth, - ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, - ?SectionOutline = SectionOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?TextInfo = TextInfo, - ?BranchValues = BranchValues, - ?Count = Count, - ?Tiling = Tiling, - ?PathBar = PathBar, - ?Root = Root, - ?Level = Level, - ?MaxDepth = MaxDepth, - ?UseDefaults = UseDefaults - ) - - - /// - /// Creates a parallel coordinates plot. - /// - /// Parallel coordinates are a common way of visualizing and analyzing high-dimensional datasets. - /// - /// To show a set of points in an n-dimensional space, a backdrop is drawn consisting of n parallel lines, typically vertical and equally spaced. A point in n-dimensional space is represented as a polyline with vertices on the parallel axes; the position of the vertex on the i-th axis corresponds to the i-th coordinate of the point. - /// - /// This visualization is closely related to time series visualization, except that it is applied to data where the axes do not correspond to points in time, and therefore do not have a natural order. Therefore, different axis arrangements may be of interest. - /// - /// the dimensions of the plot, containing both dimension backdrop information and the associated data - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the color of the lines that are connecting the datums on the dimensions - /// Sets the colorscale of the lines that are connecting the datums on the dimensions - /// Whether or not to show the colorbar of the lines that are connecting the datums on the dimensions - /// Whether or not to reverse the colorscale of the lines that are connecting the datums on the dimensions - /// Sets the lines that are connecting the datums on the dimensions (use this for more finegrained control than the other line-associated arguments). - /// Sets the angle of the labels with respect to the horizontal. For example, a `tickangle` of -90 draws the labels vertically. Tilted labels with "labelangle" may be positioned better inside margins when `labelposition` is set to "bottom". - /// Sets the label font of this trace. - /// Specifies the location of the `label`. "top" positions labels above, next to the title "bottom" positions labels below the graph Tilted labels with "labelangle" may be positioned better inside margins when `labelposition` is set to "bottom". - /// Sets the range font of this trace. - /// Sets the tick font of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member ParallelCoord - ( - dimensions: seq, - ?Name: string, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?ShowLineColorScale: bool, - ?ReverseLineColorScale: bool, - ?Line: Line, - ?LabelAngle: int, - ?LabelFont: Font, - ?LabelSide: StyleParam.Side, - ?RangeFont: Font, - ?TickFont: Font, - ?UseDefaults: bool - ) = - let useDefaults = - defaultArg UseDefaults true - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Colorscale = LineColorScale, - ?ShowScale = ShowLineColorScale, - ?ReverseScale = ReverseLineColorScale - ) - - TraceDomain.initParallelCoord ( - TraceDomainStyle.ParallelCoord( - Dimensions = dimensions, - Line = line, - ?Name = Name, - ?LabelAngle = LabelAngle, - ?LabelFont = LabelFont, - ?LabelSide = LabelSide, - ?RangeFont = RangeFont, - ?TickFont = TickFont - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a parallel coordinates plot. - /// - /// Parallel coordinates are a common way of visualizing and analyzing high-dimensional datasets. - /// - /// To show a set of points in an n-dimensional space, a backdrop is drawn consisting of n parallel lines, typically vertical and equally spaced. A point in n-dimensional space is represented as a polyline with vertices on the parallel axes; the position of the vertex on the i-th axis corresponds to the i-th coordinate of the point. - /// - /// This visualization is closely related to time series visualization, except that it is applied to data where the axes do not correspond to points in time, and therefore do not have a natural order. Therefore, different axis arrangements may be of interest. - /// - /// Sets the values for each dimension of the plot, together with the name of the respective dimension - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the color of the lines that are connecting the datums on the dimensions - /// Sets the colorscale of the lines that are connecting the datums on the dimensions - /// Whether or not to show the colorbar of the lines that are connecting the datums on the dimensions - /// Whether or not to reverse the colorscale of the lines that are connecting the datums on the dimensions - /// Sets the lines that are connecting the datums on the dimensions (use this for more finegrained control than the other line-associated arguments). - /// Sets the angle of the labels with respect to the horizontal. For example, a `tickangle` of -90 draws the labels vertically. Tilted labels with "labelangle" may be positioned better inside margins when `labelposition` is set to "bottom". - /// Sets the label font of this trace. - /// Specifies the location of the `label`. "top" positions labels above, next to the title "bottom" positions labels below the graph Tilted labels with "labelangle" may be positioned better inside margins when `labelposition` is set to "bottom". - /// Sets the range font of this trace. - /// Sets the tick font of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member ParallelCoord - ( - keyValues: seq>, - ?Name: string, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?ShowLineColorScale: bool, - ?ReverseLineColorScale: bool, - ?Line: Line, - ?LabelAngle: int, - ?LabelFont: Font, - ?LabelSide: StyleParam.Side, - ?RangeFont: Font, - ?TickFont: Font, - ?UseDefaults: bool - ) = - - let dims = - keyValues |> Seq.map (fun (key, vals) -> Dimension.initParallel (Label = key, Values = vals)) - - Chart.ParallelCoord( - dimensions = dims, - ?Name = Name, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?ShowLineColorScale = ShowLineColorScale, - ?ReverseLineColorScale = ReverseLineColorScale, - ?Line = Line, - ?LabelAngle = LabelAngle, - ?LabelFont = LabelFont, - ?LabelSide = LabelSide, - ?RangeFont = RangeFont, - ?TickFont = TickFont, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a parallel categories plot. - /// - /// The parallel categories diagram (also known as parallel sets or alluvial diagram) is a visualization of - /// multi-dimensional categorical data sets. Each variable in the data set is represented by a column of rectangles, - /// where each rectangle corresponds to a discrete value taken on by that variable. - /// The relative heights of the rectangles reflect the relative frequency of occurrence of the corresponding value. - /// - /// the dimensions of the plot, containing both dimension backdrop information and the associated data - /// Sets the trace name. The trace name appear as the legend item and on hover - /// The number of observations represented by each state. Defaults to 1 so that each state represents one observation - /// Sets the color of the lines that are connecting the datums on the dimensions - /// Sets the shape of the lines that are connecting the datums on the dimensions - /// Sets the colorscale of the lines that are connecting the datums on the dimensions - /// Whether or not to show the colorbar of the lines that are connecting the datums on the dimensions - /// Whether or not to reverse the colorscale of the lines that are connecting the datums on the dimensions - /// Sets the lines that are connecting the datums on the dimensions (use this for more finegrained control than the other line-associated arguments). - /// Sets the drag interaction mode for categories and dimensions. If `perpendicular`, the categories can only move along a line perpendicular to the paths. If `freeform`, the categories can freely move on the plane. If `fixed`, the categories and dimensions are stationary. - /// Sort paths so that like colors are bundled together within each category. - /// Sets the path sorting algorithm. If `forward`, sort paths based on dimension categories from left to right. If `backward`, sort paths based on dimensions categories from right to left. - /// Sets the label font of this trace. - /// Sets the tick font of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member ParallelCategories - ( - dimensions: seq, - ?Name: string, - ?Counts: int, - ?LineColor: Color, - ?LineShape: StyleParam.Shape, - ?LineColorScale: StyleParam.Colorscale, - ?ShowLineColorScale: bool, - ?ReverseLineColorScale: bool, - ?Line: Line, - ?Arrangement: StyleParam.CategoryArrangement, - ?BundleColors: bool, - ?SortPaths: StyleParam.SortAlgorithm, - ?LabelFont: Font, - ?TickFont: Font, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Shape = LineShape, - ?Colorscale = LineColorScale, - ?ShowScale = ShowLineColorScale, - ?ReverseScale = ReverseLineColorScale - ) - - TraceDomain.initParallelCategories ( - TraceDomainStyle.ParallelCategories( - Dimensions = dimensions, - Line = line, - ?Name = Name, - ?Counts = Counts, - ?Arrangement = Arrangement, - ?BundleColors = BundleColors, - ?SortPaths = SortPaths, - ?LabelFont = LabelFont, - ?TickFont = TickFont - ) - ) - - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a parallel categories plot. - /// - /// The parallel categories diagram (also known as parallel sets or alluvial diagram) is a visualization of - /// multi-dimensional categorical data sets. Each variable in the data set is represented by a column of rectangles, - /// where each rectangle corresponds to a discrete value taken on by that variable. - /// The relative heights of the rectangles reflect the relative frequency of occurrence of the corresponding value. - /// - /// Sets the values for each dimension of the plot, together with the name of the respective dimension - /// Sets the trace name. The trace name appear as the legend item and on hover - /// The number of observations represented by each state. Defaults to 1 so that each state represents one observation - /// Sets the color of the lines that are connecting the datums on the dimensions - /// Sets the shape of the lines that are connecting the datums on the dimensions - /// Sets the colorscale of the lines that are connecting the datums on the dimensions - /// Whether or not to show the colorbar of the lines that are connecting the datums on the dimensions - /// Whether or not to reverse the colorscale of the lines that are connecting the datums on the dimensions - /// Sets the lines that are connecting the datums on the dimensions (use this for more finegrained control than the other line-associated arguments). - /// Sets the drag interaction mode for categories and dimensions. If `perpendicular`, the categories can only move along a line perpendicular to the paths. If `freeform`, the categories can freely move on the plane. If `fixed`, the categories and dimensions are stationary. - /// Sort paths so that like colors are bundled together within each category. - /// Sets the path sorting algorithm. If `forward`, sort paths based on dimension categories from left to right. If `backward`, sort paths based on dimensions categories from right to left. - /// Sets the label font of this trace. - /// Sets the tick font of this trace. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member ParallelCategories - ( - keyValues: seq>, - ?Name: string, - ?Counts: int, - ?LineColor: Color, - ?LineShape: StyleParam.Shape, - ?LineColorScale: StyleParam.Colorscale, - ?ShowLineColorScale: bool, - ?ReverseLineColorScale: bool, - ?Line: Line, - ?Arrangement: StyleParam.CategoryArrangement, - ?BundleColors: bool, - ?SortPaths: StyleParam.SortAlgorithm, - ?LabelFont: Font, - ?TickFont: Font, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let dims = - keyValues |> Seq.map (fun (key, vals) -> Dimension.initParallel (Label = key, Values = vals)) - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Shape = LineShape, - ?Colorscale = LineColorScale, - ?ShowScale = ShowLineColorScale, - ?ReverseScale = ReverseLineColorScale - ) - - TraceDomain.initParallelCategories ( - TraceDomainStyle.ParallelCategories( - Dimensions = dims, - Line = line, - ?Name = Name, - ?Counts = Counts, - ?Arrangement = Arrangement, - ?BundleColors = BundleColors, - ?SortPaths = SortPaths, - ?LabelFont = LabelFont, - ?TickFont = TickFont - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a sankey diagram. - /// - /// A Sankey diagram is a flow diagram, in which the width of arrows is proportional to the flow quantity. - /// - /// Sankey diagrams visualize the contributions to a flow by defining source to represent the source node, target for the target node, value to set the flow volume, and label that shows the node name. - /// - /// Sets the nodes of the Sankey plot. - /// Sets the links between nodes of the Sankey plot. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Assigns id labels to each datum. - /// Sets the orientation of the Sankey diagram. - /// Sets the text font of this trace. - /// If value is `snap` (the default), the node arrangement is assisted by automatic snapping of elements to preserve space between nodes specified via `nodepad`. If value is `perpendicular`, the nodes can only move along a line perpendicular to the flow. If value is `freeform`, the nodes can freely move on the plane. If value is `fixed`, the nodes are stationary. - /// Sets the value formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. - /// Adds a unit to follow the value in the hover tooltip. Add a space if a separation is necessary from the value. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Sankey - ( - nodes: SankeyNodes, - links: SankeyLinks, - ?Name: string, - ?Ids: seq<#IConvertible>, - ?Orientation: StyleParam.Orientation, - ?TextFont: Font, - ?Arrangement: StyleParam.CategoryArrangement, - ?ValueFormat: string, - ?ValueSuffix: string, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - TraceDomain.initSankey ( - TraceDomainStyle.Sankey( - Node = nodes, - Link = links, - ?Name = Name, - ?Ids = Ids, - ?Orientation = Orientation, - ?TextFont = TextFont, - ?Arrangement = Arrangement, - ?ValueFormat = ValueFormat, - ?ValueSuffix = ValueSuffix - - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a sankey diagram. - /// - /// A Sankey diagram is a flow diagram, in which the width of arrows is proportional to the flow quantity. - /// - /// Sankey diagrams visualize the contributions to a flow by defining source to represent the source node, target for the target node, value to set the flow volume, and label that shows the node name. /// - /// Sets the labels of the nodes in the sankey diagram - /// (source, target) tuples which indicate connected nodes. These values map to the index in `nodeLabels` - /// The values for the links in the sankey diagram. - /// Sets the color of the nodes in the sankey diagram. - /// Sets the color of the node outlines in the sankey diagram. - /// Sets the outline width of the nodes in the sankey diagram. - /// Sets the thickness of the nodes in the sankey diagram. - /// Sets groups of nodes. Each group is defined by an array with the indices of the nodes it contains. Multiple groups can be specified. - /// Sets the color of the links in the sankey diagram. - /// Sets the colorscale of the links in the sankey diagram. - /// Sets the outline color of the links in the sankey diagram. - /// Sets the outline width of the links in the sankey diagram. - /// Sets the labels of the links in the sankey diagram. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Assigns id labels to each datum. - /// Sets the orientation of the Sankey diagram. - /// Sets the text font of this trace. - /// If value is `snap` (the default), the node arrangement is assisted by automatic snapping of elements to preserve space between nodes specified via `nodepad`. If value is `perpendicular`, the nodes can only move along a line perpendicular to the flow. If value is `freeform`, the nodes can freely move on the plane. If value is `fixed`, the nodes are stationary. - /// Sets the value formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. - /// Adds a unit to follow the value in the hover tooltip. Add a space if a separation is necessary from the value. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Sankey - ( - nodeLabels: seq, - linkedNodeIds: seq, - linkValues: seq<#IConvertible>, - ?NodeColor: Color, - ?NodeOutlineColor: Color, - ?NodeOutlineWidth: float, - ?NodeThickness: int, - ?NodeGroups: seq<#seq>, - ?LinkColor: Color, - ?LinkColorScales: seq, - ?LinkOutlineColor: Color, - ?LinkOutlineWidth: float, - ?LinkLabels: seq, - ?Name: string, - ?Ids: seq<#IConvertible>, - ?Orientation: StyleParam.Orientation, - ?TextFont: Font, - ?Arrangement: StyleParam.CategoryArrangement, - ?ValueFormat: string, - ?ValueSuffix: string, - ?UseDefaults: bool - ) = - - let nodeOutline = - Line.init (?Color = NodeOutlineColor, ?Width = NodeOutlineWidth) - - let nodes = - SankeyNodes.init ( - Label = nodeLabels, - Line = nodeOutline, - ?Color = NodeColor, - ?Thickness = NodeThickness, - ?Groups = NodeGroups - ) - - let linkOutline = - Line.init (?Color = LinkOutlineColor, ?Width = LinkOutlineWidth) - - let sources, targets = - Seq.unzip linkedNodeIds - - let colorScales = - LinkColorScales - |> Option.map (fun c -> c |> Seq.map (fun cs -> SankeyLinkColorscale.init (ColorScale = cs))) - - let links = - SankeyLinks.init ( - Source = sources, - Target = targets, - Line = linkOutline, - Value = linkValues, - ?ColorScales = colorScales, - ?Color = LinkColor, - ?Label = LinkLabels - ) - - Chart.Sankey( - nodes, - links, - ?Name = Name, - ?Ids = Ids, - ?Orientation = Orientation, - ?TextFont = TextFont, - ?Arrangement = Arrangement, - ?ValueFormat = ValueFormat, - ?ValueSuffix = ValueSuffix, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a table. - /// - /// The data are arranged in a grid of rows and columns. Most styling can be specified for columns, rows or individual cells. Table is using a row-major order by default, ie. the grid is represented as a vector of row vectors. - /// - /// Sets the header of the table - /// Sets the cells of the table - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Specifies the rendered order of the data columns; for example, a value `2` at position `0` means that column index `0` in the data will be rendered as the third column, as columns have an index base of zero. - /// The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths. - /// The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Table - ( - header: TableHeader, - cells: TableCells, - ?Name: string, - ?ColumnOrder: seq, - ?ColumnWidth: float, - ?MultiColumnWidth: seq, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - TraceDomain.initTable ( - TraceDomainStyle.Table( - Header = header, - Cells = cells, - ?Name = Name, - ?ColumnOrder = ColumnOrder, - ?ColumnWidth = ColumnWidth, - ?MultiColumnWidth = MultiColumnWidth - - ) - ) - |> GenericChart.ofTraceObject useDefaults - - - /// - /// Creates a table. - /// - /// The data are arranged in a grid of rows and columns. Most styling can be specified for columns, rows or individual cells. Table is using a row-major order by default, ie. the grid is represented as a vector of row vectors. - /// - /// Sets the values contained in the table header. - /// Sets the values contained in the table cells. - /// Whether or not to transpose the cells (i.e. switch from row to column major) - /// Sets the alignment of the table header. - /// Sets the alignment of the individual cells in the table header. - /// Sets the fill color of the table header. - /// Sets the height of the table header. - /// Sets the outline color of the table header cells. - /// Sets the outline width of the table header cells. - /// Sets the outline width of the individual table header cells. - /// Sets the outline of the table header cells. (use this for more finegrained control than the other line-associated arguments). - /// Sets the alignment of the table cells. - /// Sets the alignment of the individual table cells. - /// Sets the fill color of the table cells. - /// Sets the height color of the table cells. - /// Sets the outline color color of the table cells. - /// Sets the outline width of the table cells. - /// Sets the outline width of the individual table cells. - /// Sets the outline of the table cells. (use this for more finegrained control than the other line-associated arguments). - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Specifies the rendered order of the data columns; for example, a value `2` at position `0` means that column index `0` in the data will be rendered as the third column, as columns have an index base of zero. - /// The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths. - /// The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Table - ( - headerValues: seq<#seq<#IConvertible>>, - cellsValues: seq<#seq<#IConvertible>>, - ?TransposeCells: bool, - ?HeaderAlign: StyleParam.HorizontalAlign, - ?HeaderMultiAlign: seq, - ?HeaderFillColor: Color, - ?HeaderHeight: int, - ?HeaderOutlineColor: Color, - ?HeaderOutlineWidth: float, - ?HeaderOutlineMultiWidth: seq, - ?HeaderOutline: Line, - ?CellsAlign: StyleParam.HorizontalAlign, - ?CellsMultiAlign: seq, - ?CellsFillColor: Color, - ?CellsHeight: int, - ?CellsOutlineColor: Color, - ?CellsOutlineWidth: float, - ?CellsOutlineMultiWidth: seq, - ?CellsOutline: Line, - ?Name: string, - ?ColumnOrder: seq, - ?ColumnWidth: float, - ?MultiColumnWidth: seq, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let transpose = - defaultArg TransposeCells true - - let cellsValues = - if transpose then - cellsValues |> Seq.map Seq.cast |> Seq.transpose - else - cellsValues |> Seq.map Seq.cast - - let headerFill = - TableFill.init (?Color = HeaderFillColor) - - let headerOutline = - HeaderOutline - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = HeaderOutlineColor, - ?Width = HeaderOutlineWidth, - ?MultiWidth = HeaderOutlineMultiWidth - ) - - let header = - TableHeader.init ( - Values = headerValues, - Fill = headerFill, - Line = headerOutline, - ?Align = HeaderAlign, - ?MultiAlign = HeaderMultiAlign, - ?Height = HeaderHeight - ) - - let cellsFill = - TableFill.init (?Color = CellsFillColor) - - let cellsOutline = - CellsOutline - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = CellsOutlineColor, - ?Width = CellsOutlineWidth, - ?MultiWidth = CellsOutlineMultiWidth - ) - - let cells = - TableCells.init ( - Values = cellsValues, - Fill = cellsFill, - Line = cellsOutline, - ?Align = CellsAlign, - ?MultiAlign = CellsMultiAlign, - ?Height = CellsHeight - ) - - Chart.Table( - header, - cells, - ?Name = Name, - ?ColumnOrder = ColumnOrder, - ?ColumnWidth = ColumnWidth, - ?MultiColumnWidth = MultiColumnWidth, - ?UseDefaults = UseDefaults - - ) - - /// - /// Creates an Indicator chart. - /// - /// An indicator is used to visualize a single `value` along with some contextual information such as `steps` or a `threshold`, using a combination of three visual elements: a number, a delta, and/or a gauge. - /// Deltas are taken with respect to a `reference`. - /// Gauges can be either angular or bullet (aka linear) gauges. - /// - /// Sets the number to be displayed. - /// Determines how the value is displayed on the graph. `number` displays the value numerically in text. `delta` displays the difference to a reference value in text. Finally, `gauge` displays the value graphically on an axis. - /// Sets the Range of the Gauge axis - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Sets the title of this trace. - /// Sets the domain of this trace. - /// Sets the horizontal alignment of the `text` within the box. Note that this attribute has no effect if an angular gauge is displayed: in this case, it is always centered - /// - /// Sets how the delta to the delta reference is displayed - /// Sets the styles of the displayed number - /// Sets the shape of the gauge - /// Sets the styles of the gauge - /// Whether or not to show the gauge axis - /// Sets the gauge axis - /// - [] - static member Indicator - ( - value: IConvertible, - mode: StyleParam.IndicatorMode, - ?Range: StyleParam.Range, - ?Name: string, - ?Title: string, - ?Domain: Domain, - ?Align: StyleParam.IndicatorAlignment, - ?DeltaReference: #IConvertible, - ?Delta: IndicatorDelta, - ?Number: IndicatorNumber, - ?GaugeShape: StyleParam.IndicatorGaugeShape, - ?Gauge: IndicatorGauge, - ?ShowGaugeAxis: bool, - ?GaugeAxis: LinearAxis, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let axis = - GaugeAxis - |> Option.defaultValue (LinearAxis.init ()) - |> LinearAxis.style (?Range = Range, ?Visible = ShowGaugeAxis) - - let gauge = - Gauge - |> Option.defaultValue (IndicatorGauge.init ()) - |> IndicatorGauge.style (Axis = axis, ?Shape = GaugeShape) - - let delta = - Delta - |> Option.defaultValue (IndicatorDelta.init ()) - |> IndicatorDelta.style (?Reference = DeltaReference) - - TraceDomain.initIndicator ( - TraceDomainStyle.Indicator( - ?Name = Name, - ?Title = Title, - Mode = mode, - Value = value, - ?Domain = Domain, - ?Align = Align, - Delta = delta, - ?Number = Number, - Gauge = gauge - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates an icicle chart. - /// - /// Icicle charts visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. - /// The icicle sectors are determined by the entries in "labels" or "ids" and in "parents". - /// - /// Sets the labels of each of the sectors. - /// 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. - /// Sets the values associated with each of the sectors. - /// Assigns id labels to each datum. These ids for object constancy of data points during animation. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the colorscale for the section values - /// Whether or not to show the section colorbar - /// Whether or not to show the section colorscale - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// 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. - /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. - /// Sets the orientation of the tiling. - /// Sets the flip of the tiling: Determines if the positions obtained from solver are flipped on each axis. - /// Sets the styles for the icicle tiling - /// Sets the edge shape of the pathbar. - /// Sets the pathbar - /// Determines which trace information appear on the graph. - /// Sets the styles for the root of this trace. - /// 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`. - /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Icicle - ( - labels: seq<#IConvertible>, - parents: seq<#IConvertible>, - ?Values: seq<#IConvertible>, - ?Ids: seq<#IConvertible>, - ?Name: string, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionColorScale: StyleParam.Colorscale, - ?ShowSectionColorScale: bool, - ?ReverseSectionColorScale: bool, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?BranchValues: StyleParam.BranchValues, - ?Count: StyleParam.IcicleCount, - ?TilingOrientation: StyleParam.Orientation, - ?TilingFlip: StyleParam.TilingFlip, - ?Tiling: IcicleTiling, - ?PathBarEdgeShape: StyleParam.PathbarEdgeShape, - ?PathBar: Pathbar, - ?TextInfo: StyleParam.TextInfo, - ?Root: IcicleRoot, - ?Level: string, - ?MaxDepth: int, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let outline = - SectionOutline - |> Option.defaultValue (Line.init ()) - |> Line.style ( - ?Color = SectionOutlineColor, - ?Width = SectionOutlineWidth, - ?MultiWidth = SectionOutlineMultiWidth - ) - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?MultiOpacity = MultiOpacity, - ?Colors = SectionColors, - ?Colorscale = SectionColorScale, - ?ShowScale = ShowSectionColorScale, - ?ReverseScale = ReverseSectionColorScale, - Outline = outline, - Pattern = pattern - ) - - let tiling = - Tiling - |> Option.defaultValue (IcicleTiling.init ()) - |> IcicleTiling.style (?Orientation = TilingOrientation, ?Flip = TilingFlip) - - let pathbar = - PathBar |> Option.defaultValue (Pathbar.init ()) |> Pathbar.style (?EdgeShape = PathBarEdgeShape) - - TraceDomain.initIcicle ( - TraceDomainStyle.Icicle( - Labels = labels, - Parents = parents, - Marker = marker, - PathBar = pathbar, - Tiling = tiling, - ?Values = Values, - ?Ids = Ids, - ?Name = Name, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?BranchValues = BranchValues, - ?Count = Count, - ?TextInfo = TextInfo, - ?Root = Root, - ?Level = Level, - ?MaxDepth = MaxDepth - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates an icicle chart from encoded hierarchy arrays. - /// - /// Icicle charts visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. - /// The icicle sectors are determined by the entries in "labels" or "ids" and in "parents". - /// - /// Sets the labels of each of the sectors as an encoded typed array. - /// Sets the parent sectors for each of the sectors as an encoded typed array. - /// Sets the values associated with each of the sectors as an encoded typed array. - /// Assigns id labels to each datum as an encoded typed array. These ids for object constancy of data points during animation. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the colorscale for the section values - /// Whether or not to show the section colorbar - /// Whether or not to show the section colorscale - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// 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. - /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. - /// Sets the orientation of the tiling. - /// Sets the flip of the tiling: Determines if the positions obtained from solver are flipped on each axis. - /// Sets the styles for the icicle tiling - /// Sets the edge shape of the pathbar. - /// Sets the pathbar - /// Determines which trace information appear on the graph. - /// Sets the styles for the root of this trace. - /// 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`. - /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Icicle - ( - labelsEncoded: EncodedTypedArray, - parentsEncoded: EncodedTypedArray, - ?valuesEncoded: EncodedTypedArray, - ?idsEncoded: EncodedTypedArray, - ?Name: string, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionColorScale: StyleParam.Colorscale, - ?ShowSectionColorScale: bool, - ?ReverseSectionColorScale: bool, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?BranchValues: StyleParam.BranchValues, - ?Count: StyleParam.IcicleCount, - ?TilingOrientation: StyleParam.Orientation, - ?TilingFlip: StyleParam.TilingFlip, - ?Tiling: IcicleTiling, - ?PathBarEdgeShape: StyleParam.PathbarEdgeShape, - ?PathBar: Pathbar, - ?TextInfo: StyleParam.TextInfo, - ?Root: IcicleRoot, - ?Level: string, - ?MaxDepth: int, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let outline = - SectionOutline - |> Option.defaultValue (Line.init ()) - |> Line.style ( - ?Color = SectionOutlineColor, - ?Width = SectionOutlineWidth, - ?MultiWidth = SectionOutlineMultiWidth - ) - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?MultiOpacity = MultiOpacity, - ?Colors = SectionColors, - ?Colorscale = SectionColorScale, - ?ShowScale = ShowSectionColorScale, - ?ReverseScale = ReverseSectionColorScale, - Outline = outline, - Pattern = pattern - ) - - let tiling = - Tiling - |> Option.defaultValue (IcicleTiling.init ()) - |> IcicleTiling.style (?Orientation = TilingOrientation, ?Flip = TilingFlip) - - let pathbar = - PathBar |> Option.defaultValue (Pathbar.init ()) |> Pathbar.style (?EdgeShape = PathBarEdgeShape) - - TraceDomain.initIcicle ( - TraceDomainStyle.Icicle( - LabelsEncoded = labelsEncoded, - ParentsEncoded = parentsEncoded, - Marker = marker, - PathBar = pathbar, - Tiling = tiling, - ?ValuesEncoded = valuesEncoded, - ?IdsEncoded = idsEncoded, - ?Name = Name, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?BranchValues = BranchValues, - ?Count = Count, - ?TextInfo = TextInfo, - ?Root = Root, - ?Level = Level, - ?MaxDepth = MaxDepth - ) - ) - |> GenericChart.ofTraceObject useDefaults - - - /// - /// Creates an icicle chart. - /// - /// Icicle charts visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. - /// The icicle sectors are determined by the entries in "labels" or "ids" and in "parents". - /// - /// Sets the labels of each of the sectors and their respective parent sector. - /// Sets the values associated with each of the sectors. - /// Assigns id labels to each datum. These ids for object constancy of data points during animation. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. - /// Sets the colors associated with each section. - /// Sets the colorscale for the section values - /// Whether or not to show the section colorbar - /// Whether or not to show the section colorscale - /// Sets the color of the section outline. - /// Sets the width of the section outline. - /// Sets the width of each individual section outline. - /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). - /// Sets a pattern shape for all sections - /// Sets an individual pattern shape for each section - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). - /// 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. - /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. - /// Sets the orientation of the tiling. - /// Sets the flip of the tiling: Determines if the positions obtained from solver are flipped on each axis. - /// Sets the styles for the icicle tiling - /// Sets the edge shape of the pathbar. - /// Sets the pathbar - /// Determines which trace information appear on the graph. - /// Sets the styles for the root of this trace. - /// 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`. - /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member Icicle - ( - labelsparents: seq<#IConvertible * #IConvertible>, - ?Values: seq<#IConvertible>, - ?Ids: seq<#IConvertible>, - ?Name: string, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?SectionColors: seq, - ?SectionColorScale: StyleParam.Colorscale, - ?ShowSectionColorScale: bool, - ?ReverseSectionColorScale: bool, - ?SectionOutlineColor: Color, - ?SectionOutlineWidth: float, - ?SectionOutlineMultiWidth: seq, - ?SectionOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?BranchValues: StyleParam.BranchValues, - ?Count: StyleParam.IcicleCount, - ?TilingOrientation: StyleParam.Orientation, - ?TilingFlip: StyleParam.TilingFlip, - ?Tiling: IcicleTiling, - ?PathBarEdgeShape: StyleParam.PathbarEdgeShape, - ?PathBar: Pathbar, - ?TextInfo: StyleParam.TextInfo, - ?Root: IcicleRoot, - ?Level: string, - ?MaxDepth: int, - ?UseDefaults: bool - ) = - - let labels, parents = - Seq.unzip labelsparents - - Chart.Icicle( - labels, - parents, - ?Values = Values, - ?Ids = Ids, - ?Name = Name, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?SectionColors = SectionColors, - ?SectionColorScale = SectionColorScale, - ?ShowSectionColorScale = ShowSectionColorScale, - ?ReverseSectionColorScale = ReverseSectionColorScale, - ?SectionOutlineColor = SectionOutlineColor, - ?SectionOutlineWidth = SectionOutlineWidth, - ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, - ?SectionOutline = SectionOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?BranchValues = BranchValues, - ?Count = Count, - ?TilingOrientation = TilingOrientation, - ?TilingFlip = TilingFlip, - ?Tiling = Tiling, - ?PathBarEdgeShape = PathBarEdgeShape, - ?PathBar = PathBar, - ?TextInfo = TextInfo, - ?Root = Root, - ?Level = Level, - ?MaxDepth = MaxDepth, - ?UseDefaults = UseDefaults - - ) diff --git a/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Hierarchy.fs b/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Hierarchy.fs new file mode 100644 index 00000000..4f92699d --- /dev/null +++ b/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Hierarchy.fs @@ -0,0 +1,769 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module ChartDomain_Hierarchy = + + [] + type Chart = + /// + /// Creates a sunburst chart, which visualizes hierarchical data spanning outward radially from root to leaves. + /// + /// The hierarchy is defined by labels and parents attributes. The root starts from the center and children are added to the outer rings. + /// + /// Sets the labels of each of the sectors. + /// 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. + /// Sets the values associated with each of the sectors. + /// Assigns id labels to each datum. These ids for object constancy of data points during animation. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the colors associated with each section. + /// Sets the colorscale for the section values + /// Whether or not to show the section colorbar + /// Whether or not to show the section colorscale + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// 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. + /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. + /// Sets the styles for the root of this trace. + /// Sets the styles for the leaves of this trace. + /// 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`. + /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. + /// Rotates the whole diagram counterclockwise by some angle. By default the first slice starts at 3 o'clock. + /// Determines whether or not the sectors are reordered from largest to smallest. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Sunburst + ( + labels: seq<#IConvertible>, + parents: seq<#IConvertible>, + ?Values: seq<#IConvertible>, + ?Ids: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?SectionColors: seq, + ?SectionColorScale: StyleParam.Colorscale, + ?ShowSectionColorScale: bool, + ?ReverseSectionColorScale: bool, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?BranchValues: StyleParam.BranchValues, + ?Count: string, + ?Root: SunburstRoot, + ?Leaf: SunburstLeaf, + ?Level: string, + ?MaxDepth: int, + ?Rotation: int, + ?Sort: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let outline = + SectionOutline + |> Option.defaultValue (Line.init ()) + |> Line.style ( + ?Color = SectionOutlineColor, + ?Width = SectionOutlineWidth, + ?MultiWidth = SectionOutlineMultiWidth + ) + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?MultiOpacity = MultiOpacity, + ?Colors = SectionColors, + ?Colorscale = SectionColorScale, + ?ShowScale = ShowSectionColorScale, + ?ReverseScale = ReverseSectionColorScale, + Outline = outline, + Pattern = pattern + ) + + TraceDomain.initSunburst ( + TraceDomainStyle.Sunburst( + Labels = labels, + Parents = parents, + Marker = marker, + ?Values = Values, + ?Ids = Ids, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextInfo = TextInfo, + ?Rotation = Rotation, + ?Sort = Sort, + ?BranchValues = BranchValues, + ?Count = Count, + ?Root = Root, + ?Leaf = Leaf, + ?Level = Level, + ?MaxDepth = MaxDepth + + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a sunburst chart from encoded labels and parents. + /// + /// Sets the labels of each of the sectors as an encoded typed array. + /// Sets the parent sectors for each of the sectors as an encoded typed array. + /// Sets the values associated with each of the sectors as an encoded typed array. + /// Assigns id labels to each datum as an encoded typed array. These ids for object constancy of data points during animation. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the colors associated with each section. + /// Sets the colorscale for the section values + /// Whether or not to show the section colorbar + /// Whether or not to show the section colorscale + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// 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. + /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. + /// Sets the styles for the root of this trace. + /// Sets the styles for the leaves of this trace. + /// 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`. + /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. + /// Rotates the whole diagram counterclockwise by some angle. By default the first slice starts at 3 o'clock. + /// Determines whether or not the sectors are reordered from largest to smallest. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Sunburst + ( + labelsEncoded: EncodedTypedArray, + parentsEncoded: EncodedTypedArray, + ?valuesEncoded: EncodedTypedArray, + ?idsEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?SectionColors: seq, + ?SectionColorScale: StyleParam.Colorscale, + ?ShowSectionColorScale: bool, + ?ReverseSectionColorScale: bool, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?BranchValues: StyleParam.BranchValues, + ?Count: string, + ?Root: SunburstRoot, + ?Leaf: SunburstLeaf, + ?Level: string, + ?MaxDepth: int, + ?Rotation: int, + ?Sort: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let outline = + SectionOutline + |> Option.defaultValue (Line.init ()) + |> Line.style ( + ?Color = SectionOutlineColor, + ?Width = SectionOutlineWidth, + ?MultiWidth = SectionOutlineMultiWidth + ) + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?MultiOpacity = MultiOpacity, + ?Colors = SectionColors, + ?Colorscale = SectionColorScale, + ?ShowScale = ShowSectionColorScale, + ?ReverseScale = ReverseSectionColorScale, + Outline = outline, + Pattern = pattern + ) + + TraceDomain.initSunburst ( + TraceDomainStyle.Sunburst( + LabelsEncoded = labelsEncoded, + ParentsEncoded = parentsEncoded, + Marker = marker, + ?ValuesEncoded = valuesEncoded, + ?IdsEncoded = idsEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextInfo = TextInfo, + ?Rotation = Rotation, + ?Sort = Sort, + ?BranchValues = BranchValues, + ?Count = Count, + ?Root = Root, + ?Leaf = Leaf, + ?Level = Level, + ?MaxDepth = MaxDepth + + ) + ) + |> GenericChart.ofTraceObject useDefaults + + + + /// + /// Creates a sunburst chart, which visualizes hierarchical data spanning outward radially from root to leaves. + /// + /// The hierarchy is defined by labels and parents attributes. The root starts from the center and children are added to the outer rings. + /// + /// Sets the labels of each of the sectors and their respective parent sector. + /// Sets the values associated with each of the sectors. + /// Assigns id labels to each datum. These ids for object constancy of data points during animation. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the colors associated with each section. + /// Sets the colorscale for the section values + /// Whether or not to show the section colorbar + /// Whether or not to show the section colorscale + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// 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. + /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. + /// Sets the styles for the root of this trace. + /// Sets the styles for the leaves of this trace. + /// 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`. + /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. + /// Rotates the whole diagram counterclockwise by some angle. By default the first slice starts at 3 o'clock. + /// Determines whether or not the sectors are reordered from largest to smallest. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Sunburst + ( + labelsparents: seq<#IConvertible * #IConvertible>, + ?Values: seq<#IConvertible>, + ?Ids: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?SectionColors: seq, + ?SectionColorScale: StyleParam.Colorscale, + ?ShowSectionColorScale: bool, + ?ReverseSectionColorScale: bool, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?BranchValues: StyleParam.BranchValues, + ?Count: string, + ?Root: SunburstRoot, + ?Leaf: SunburstLeaf, + ?Level: string, + ?MaxDepth: int, + ?Rotation: int, + ?Sort: bool, + ?UseDefaults: bool + ) = + + let labels, parents = + Seq.unzip labelsparents + + Chart.Sunburst( + labels, + parents, + ?Values = Values, + ?Ids = Ids, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?SectionColors = SectionColors, + ?SectionColorScale = SectionColorScale, + ?ShowSectionColorScale = ShowSectionColorScale, + ?ReverseSectionColorScale = ReverseSectionColorScale, + ?SectionOutlineColor = SectionOutlineColor, + ?SectionOutlineWidth = SectionOutlineWidth, + ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, + ?SectionOutline = SectionOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?TextInfo = TextInfo, + ?BranchValues = BranchValues, + ?Count = Count, + ?Root = Root, + ?Leaf = Leaf, + ?Level = Level, + ?MaxDepth = MaxDepth, + ?Rotation = Rotation, + ?Sort = Sort, + ?UseDefaults = UseDefaults + ) + + + /// + /// 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. + /// + /// Sets the labels of each of the sectors. + /// 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. + /// Sets the values associated with each of the sectors. + /// Assigns id labels to each datum. These ids for object constancy of data points during animation. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the colorscale for the section values + /// Whether or not to show the section colorbar + /// Whether or not to show the section colorscale + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// 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. + /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. + /// Sets the tiling for this trace. + /// Sets the path bar for this trace. + /// Sets the styles for the root of this trace. + /// 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`. + /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Treemap + ( + labels: seq<#IConvertible>, + parents: seq<#IConvertible>, + ?Values: seq<#IConvertible>, + ?Ids: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionColorScale: StyleParam.Colorscale, + ?ShowSectionColorScale: bool, + ?ReverseSectionColorScale: bool, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?BranchValues: StyleParam.BranchValues, + ?Count: string, + ?Tiling: TreemapTiling, + ?PathBar: Pathbar, + ?Root: TreemapRoot, + ?Level: string, + ?MaxDepth: int, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let outline = + SectionOutline + |> Option.defaultValue (Line.init ()) + |> Line.style ( + ?Color = SectionOutlineColor, + ?Width = SectionOutlineWidth, + ?MultiWidth = SectionOutlineMultiWidth + ) + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?MultiOpacity = MultiOpacity, + ?Colors = SectionColors, + ?Colorscale = SectionColorScale, + ?ShowScale = ShowSectionColorScale, + ?ReverseScale = ReverseSectionColorScale, + Outline = outline, + Pattern = pattern + ) + + TraceDomain.initTreemap ( + TraceDomainStyle.Treemap( + Labels = labels, + Parents = parents, + Marker = marker, + ?Values = Values, + ?Ids = Ids, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?TextInfo = TextInfo, + ?BranchValues = BranchValues, + ?Count = Count, + ?Tiling = Tiling, + ?PathBar = PathBar, + ?Root = Root, + ?Level = Level, + ?MaxDepth = MaxDepth + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a treemap chart from encoded labels and parents. + /// + /// Sets the labels of each of the sectors as an encoded typed array. + /// Sets the parent sectors for each of the sectors as an encoded typed array. + /// Sets the values associated with each of the sectors as an encoded typed array. + /// Assigns id labels to each datum as an encoded typed array. These ids for object constancy of data points during animation. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the colorscale for the section values + /// Whether or not to show the section colorbar + /// Whether or not to show the section colorscale + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// 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. + /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. + /// Sets the tiling for this trace. + /// Sets the path bar for this trace. + /// Sets the styles for the root of this trace. + /// 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`. + /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Treemap + ( + labelsEncoded: EncodedTypedArray, + parentsEncoded: EncodedTypedArray, + ?valuesEncoded: EncodedTypedArray, + ?idsEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionColorScale: StyleParam.Colorscale, + ?ShowSectionColorScale: bool, + ?ReverseSectionColorScale: bool, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?BranchValues: StyleParam.BranchValues, + ?Count: string, + ?Tiling: TreemapTiling, + ?PathBar: Pathbar, + ?Root: TreemapRoot, + ?Level: string, + ?MaxDepth: int, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let outline = + SectionOutline + |> Option.defaultValue (Line.init ()) + |> Line.style ( + ?Color = SectionOutlineColor, + ?Width = SectionOutlineWidth, + ?MultiWidth = SectionOutlineMultiWidth + ) + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?MultiOpacity = MultiOpacity, + ?Colors = SectionColors, + ?Colorscale = SectionColorScale, + ?ShowScale = ShowSectionColorScale, + ?ReverseScale = ReverseSectionColorScale, + Outline = outline, + Pattern = pattern + ) + + TraceDomain.initTreemap ( + TraceDomainStyle.Treemap( + LabelsEncoded = labelsEncoded, + ParentsEncoded = parentsEncoded, + Marker = marker, + ?ValuesEncoded = valuesEncoded, + ?IdsEncoded = idsEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?TextInfo = TextInfo, + ?BranchValues = BranchValues, + ?Count = Count, + ?Tiling = Tiling, + ?PathBar = PathBar, + ?Root = Root, + ?Level = Level, + ?MaxDepth = MaxDepth + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// 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. + /// + /// Sets the labels of each of the sectors and their respective parent sector. + /// Sets the values associated with each of the sectors. + /// Assigns id labels to each datum. These ids for object constancy of data points during animation. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the colorscale for the section values + /// Whether or not to show the section colorbar + /// Whether or not to show the section colorscale + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// 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. + /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. + /// Sets the tiling for this trace. + /// Sets the path bar for this trace. + /// Sets the styles for the root of this trace. + /// 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`. + /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Treemap + ( + labelsparents: seq<#IConvertible * #IConvertible>, + ?Values: seq<#IConvertible>, + ?Ids: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionColorScale: StyleParam.Colorscale, + ?ShowSectionColorScale: bool, + ?ReverseSectionColorScale: bool, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?BranchValues: StyleParam.BranchValues, + ?Count: string, + ?Tiling: TreemapTiling, + ?PathBar: Pathbar, + ?Root: TreemapRoot, + ?Level: string, + ?MaxDepth: int, + ?UseDefaults: bool + ) = + + let labels, parents = + Seq.unzip labelsparents + + Chart.Treemap( + labels, + parents, + ?Values = Values, + ?Ids = Ids, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?SectionColors = SectionColors, + ?SectionColorScale = SectionColorScale, + ?ShowSectionColorScale = ShowSectionColorScale, + ?ReverseSectionColorScale = ReverseSectionColorScale, + ?SectionOutlineColor = SectionOutlineColor, + ?SectionOutlineWidth = SectionOutlineWidth, + ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, + ?SectionOutline = SectionOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?TextInfo = TextInfo, + ?BranchValues = BranchValues, + ?Count = Count, + ?Tiling = Tiling, + ?PathBar = PathBar, + ?Root = Root, + ?Level = Level, + ?MaxDepth = MaxDepth, + ?UseDefaults = UseDefaults + ) + + diff --git a/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Icicle.fs b/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Icicle.fs new file mode 100644 index 00000000..8fba22eb --- /dev/null +++ b/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Icicle.fs @@ -0,0 +1,427 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module ChartDomain_Icicle = + + [] + type Chart = + /// + /// Creates an icicle chart. + /// + /// Icicle charts visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. + /// The icicle sectors are determined by the entries in "labels" or "ids" and in "parents". + /// + /// Sets the labels of each of the sectors. + /// 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. + /// Sets the values associated with each of the sectors. + /// Assigns id labels to each datum. These ids for object constancy of data points during animation. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the colorscale for the section values + /// Whether or not to show the section colorbar + /// Whether or not to show the section colorscale + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// 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. + /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. + /// Sets the orientation of the tiling. + /// Sets the flip of the tiling: Determines if the positions obtained from solver are flipped on each axis. + /// Sets the styles for the icicle tiling + /// Sets the edge shape of the pathbar. + /// Sets the pathbar + /// Determines which trace information appear on the graph. + /// Sets the styles for the root of this trace. + /// 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`. + /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Icicle + ( + labels: seq<#IConvertible>, + parents: seq<#IConvertible>, + ?Values: seq<#IConvertible>, + ?Ids: seq<#IConvertible>, + ?Name: string, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionColorScale: StyleParam.Colorscale, + ?ShowSectionColorScale: bool, + ?ReverseSectionColorScale: bool, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?BranchValues: StyleParam.BranchValues, + ?Count: StyleParam.IcicleCount, + ?TilingOrientation: StyleParam.Orientation, + ?TilingFlip: StyleParam.TilingFlip, + ?Tiling: IcicleTiling, + ?PathBarEdgeShape: StyleParam.PathbarEdgeShape, + ?PathBar: Pathbar, + ?TextInfo: StyleParam.TextInfo, + ?Root: IcicleRoot, + ?Level: string, + ?MaxDepth: int, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let outline = + SectionOutline + |> Option.defaultValue (Line.init ()) + |> Line.style ( + ?Color = SectionOutlineColor, + ?Width = SectionOutlineWidth, + ?MultiWidth = SectionOutlineMultiWidth + ) + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?MultiOpacity = MultiOpacity, + ?Colors = SectionColors, + ?Colorscale = SectionColorScale, + ?ShowScale = ShowSectionColorScale, + ?ReverseScale = ReverseSectionColorScale, + Outline = outline, + Pattern = pattern + ) + + let tiling = + Tiling + |> Option.defaultValue (IcicleTiling.init ()) + |> IcicleTiling.style (?Orientation = TilingOrientation, ?Flip = TilingFlip) + + let pathbar = + PathBar |> Option.defaultValue (Pathbar.init ()) |> Pathbar.style (?EdgeShape = PathBarEdgeShape) + + TraceDomain.initIcicle ( + TraceDomainStyle.Icicle( + Labels = labels, + Parents = parents, + Marker = marker, + PathBar = pathbar, + Tiling = tiling, + ?Values = Values, + ?Ids = Ids, + ?Name = Name, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?BranchValues = BranchValues, + ?Count = Count, + ?TextInfo = TextInfo, + ?Root = Root, + ?Level = Level, + ?MaxDepth = MaxDepth + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates an icicle chart from encoded hierarchy arrays. + /// + /// Icicle charts visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. + /// The icicle sectors are determined by the entries in "labels" or "ids" and in "parents". + /// + /// Sets the labels of each of the sectors as an encoded typed array. + /// Sets the parent sectors for each of the sectors as an encoded typed array. + /// Sets the values associated with each of the sectors as an encoded typed array. + /// Assigns id labels to each datum as an encoded typed array. These ids for object constancy of data points during animation. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the colorscale for the section values + /// Whether or not to show the section colorbar + /// Whether or not to show the section colorscale + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// 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. + /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. + /// Sets the orientation of the tiling. + /// Sets the flip of the tiling: Determines if the positions obtained from solver are flipped on each axis. + /// Sets the styles for the icicle tiling + /// Sets the edge shape of the pathbar. + /// Sets the pathbar + /// Determines which trace information appear on the graph. + /// Sets the styles for the root of this trace. + /// 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`. + /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Icicle + ( + labelsEncoded: EncodedTypedArray, + parentsEncoded: EncodedTypedArray, + ?valuesEncoded: EncodedTypedArray, + ?idsEncoded: EncodedTypedArray, + ?Name: string, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionColorScale: StyleParam.Colorscale, + ?ShowSectionColorScale: bool, + ?ReverseSectionColorScale: bool, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?BranchValues: StyleParam.BranchValues, + ?Count: StyleParam.IcicleCount, + ?TilingOrientation: StyleParam.Orientation, + ?TilingFlip: StyleParam.TilingFlip, + ?Tiling: IcicleTiling, + ?PathBarEdgeShape: StyleParam.PathbarEdgeShape, + ?PathBar: Pathbar, + ?TextInfo: StyleParam.TextInfo, + ?Root: IcicleRoot, + ?Level: string, + ?MaxDepth: int, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let outline = + SectionOutline + |> Option.defaultValue (Line.init ()) + |> Line.style ( + ?Color = SectionOutlineColor, + ?Width = SectionOutlineWidth, + ?MultiWidth = SectionOutlineMultiWidth + ) + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?MultiOpacity = MultiOpacity, + ?Colors = SectionColors, + ?Colorscale = SectionColorScale, + ?ShowScale = ShowSectionColorScale, + ?ReverseScale = ReverseSectionColorScale, + Outline = outline, + Pattern = pattern + ) + + let tiling = + Tiling + |> Option.defaultValue (IcicleTiling.init ()) + |> IcicleTiling.style (?Orientation = TilingOrientation, ?Flip = TilingFlip) + + let pathbar = + PathBar |> Option.defaultValue (Pathbar.init ()) |> Pathbar.style (?EdgeShape = PathBarEdgeShape) + + TraceDomain.initIcicle ( + TraceDomainStyle.Icicle( + LabelsEncoded = labelsEncoded, + ParentsEncoded = parentsEncoded, + Marker = marker, + PathBar = pathbar, + Tiling = tiling, + ?ValuesEncoded = valuesEncoded, + ?IdsEncoded = idsEncoded, + ?Name = Name, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?BranchValues = BranchValues, + ?Count = Count, + ?TextInfo = TextInfo, + ?Root = Root, + ?Level = Level, + ?MaxDepth = MaxDepth + ) + ) + |> GenericChart.ofTraceObject useDefaults + + + /// + /// Creates an icicle chart. + /// + /// Icicle charts visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. + /// The icicle sectors are determined by the entries in "labels" or "ids" and in "parents". + /// + /// Sets the labels of each of the sectors and their respective parent sector. + /// Sets the values associated with each of the sectors. + /// Assigns id labels to each datum. These ids for object constancy of data points during animation. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the colorscale for the section values + /// Whether or not to show the section colorbar + /// Whether or not to show the section colorscale + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// 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. + /// Determines default for `values` when it is not provided, by inferring a 1 for each of the "leaves" and/or "branches", otherwise 0. + /// Sets the orientation of the tiling. + /// Sets the flip of the tiling: Determines if the positions obtained from solver are flipped on each axis. + /// Sets the styles for the icicle tiling + /// Sets the edge shape of the pathbar. + /// Sets the pathbar + /// Determines which trace information appear on the graph. + /// Sets the styles for the root of this trace. + /// 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`. + /// Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Icicle + ( + labelsparents: seq<#IConvertible * #IConvertible>, + ?Values: seq<#IConvertible>, + ?Ids: seq<#IConvertible>, + ?Name: string, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionColorScale: StyleParam.Colorscale, + ?ShowSectionColorScale: bool, + ?ReverseSectionColorScale: bool, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?BranchValues: StyleParam.BranchValues, + ?Count: StyleParam.IcicleCount, + ?TilingOrientation: StyleParam.Orientation, + ?TilingFlip: StyleParam.TilingFlip, + ?Tiling: IcicleTiling, + ?PathBarEdgeShape: StyleParam.PathbarEdgeShape, + ?PathBar: Pathbar, + ?TextInfo: StyleParam.TextInfo, + ?Root: IcicleRoot, + ?Level: string, + ?MaxDepth: int, + ?UseDefaults: bool + ) = + + let labels, parents = + Seq.unzip labelsparents + + Chart.Icicle( + labels, + parents, + ?Values = Values, + ?Ids = Ids, + ?Name = Name, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?SectionColors = SectionColors, + ?SectionColorScale = SectionColorScale, + ?ShowSectionColorScale = ShowSectionColorScale, + ?ReverseSectionColorScale = ReverseSectionColorScale, + ?SectionOutlineColor = SectionOutlineColor, + ?SectionOutlineWidth = SectionOutlineWidth, + ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, + ?SectionOutline = SectionOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?BranchValues = BranchValues, + ?Count = Count, + ?TilingOrientation = TilingOrientation, + ?TilingFlip = TilingFlip, + ?Tiling = Tiling, + ?PathBarEdgeShape = PathBarEdgeShape, + ?PathBar = PathBar, + ?TextInfo = TextInfo, + ?Root = Root, + ?Level = Level, + ?MaxDepth = MaxDepth, + ?UseDefaults = UseDefaults + + ) diff --git a/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Pie.fs b/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Pie.fs new file mode 100644 index 00000000..fde47b81 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Pie.fs @@ -0,0 +1,876 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module ChartDomain_Pie = + + [] + type Chart = + /// + /// Creates a pie chart. + /// + /// A pie chart (or a circle chart) is a circular statistical graphic, which is divided into slices to illustrate numerical proportion. + /// In a pie chart, the arc length of each slice (and consequently its central angle and area), is proportional to the quantity it represents. + /// + /// Sets the values of the sectors + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets the sector labels. If `labels` entries are duplicated, the associated `values` are summed. + /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. + /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// Specifies the direction at which succeeding sectors follow one another. + /// Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart. + /// Instead of the first slice starting at 12 o'clock, rotate to some other angle. + /// Determines whether or not the sectors are reordered from largest to smallest. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Pie + ( + values: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Labels: seq<#IConvertible>, + ?Pull: float, + ?MultiPull: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?Direction: StyleParam.Direction, + ?Hole: float, + ?Rotation: float, + ?Sort: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let outline = + SectionOutline + |> Option.defaultValue (Line.init ()) + |> Line.style ( + ?Color = SectionOutlineColor, + ?Width = SectionOutlineWidth, + ?MultiWidth = SectionOutlineMultiWidth + ) + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style (?Colors = SectionColors, ?MultiOpacity = MultiOpacity, Outline = outline, Pattern = pattern) + + + TraceDomain.initPie ( + TraceDomainStyle.Pie( + Values = values, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Labels = Labels, + ?Pull = Pull, + ?MultiPull = MultiPull, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + Marker = marker, + ?TextInfo = TextInfo, + ?Direction = Direction, + ?Hole = Hole, + ?Rotation = Rotation, + ?Sort = Sort + + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a pie chart from encoded values and labels. + /// + /// Sets the values of the sectors as an encoded typed array. + /// Sets the sector labels as an encoded typed array. If `labels` entries are duplicated, the associated `values` are summed. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. + /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each bar + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// Specifies the direction at which succeeding sectors follow one another. + /// Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart. + /// Instead of the first slice starting at 12 o'clock, rotate to some other angle. + /// Determines whether or not the sectors are reordered from largest to smallest. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Pie + ( + valuesEncoded: EncodedTypedArray, + ?labelsEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Pull: float, + ?MultiPull: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?Direction: StyleParam.Direction, + ?Hole: float, + ?Rotation: float, + ?Sort: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let outline = + SectionOutline + |> Option.defaultValue (Line.init ()) + |> Line.style ( + ?Color = SectionOutlineColor, + ?Width = SectionOutlineWidth, + ?MultiWidth = SectionOutlineMultiWidth + ) + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style (?Colors = SectionColors, ?MultiOpacity = MultiOpacity, Outline = outline, Pattern = pattern) + + + TraceDomain.initPie ( + TraceDomainStyle.Pie( + ValuesEncoded = valuesEncoded, + ?LabelsEncoded = labelsEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Pull = Pull, + ?MultiPull = MultiPull, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + Marker = marker, + ?TextInfo = TextInfo, + ?Direction = Direction, + ?Hole = Hole, + ?Rotation = Rotation, + ?Sort = Sort + + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a pie chart. + /// + /// A pie chart (or a circle chart) is a circular statistical graphic, which is divided into slices to illustrate numerical proportion. + /// In a pie chart, the arc length of each slice (and consequently its central angle and area), is proportional to the quantity it represents. + /// + /// Sets the values and labels of the sectors. If label entries are duplicated, the associated values are summed. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. + /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// Specifies the direction at which succeeding sectors follow one another. + /// Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart. + /// Instead of the first slice starting at 12 o'clock, rotate to some other angle. + /// Determines whether or not the sectors are reordered from largest to smallest. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Pie + ( + valuesLabels: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Pull: float, + ?MultiPull: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?Direction: StyleParam.Direction, + ?Hole: float, + ?Rotation: float, + ?Sort: bool, + ?UseDefaults: bool + ) = + + let values, labels = Seq.unzip valuesLabels + + Chart.Pie( + values, + Labels = labels, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Pull = Pull, + ?MultiPull = MultiPull, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?SectionColors = SectionColors, + ?SectionOutlineColor = SectionOutlineColor, + ?SectionOutlineWidth = SectionOutlineWidth, + ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, + ?SectionOutline = SectionOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?TextInfo = TextInfo, + ?Direction = Direction, + ?Hole = Hole, + ?Rotation = Rotation, + ?Sort = Sort, + ?UseDefaults = UseDefaults + ) + + + /// + /// Creates a doughnut chart. + /// + /// A doughnut chart is a variation of the pie chart that has a fraction cut from the center of the slices. + /// + /// Sets the values of the sectors + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets the sector labels. If `labels` entries are duplicated, the associated `values` are summed. + /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. + /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// Specifies the direction at which succeeding sectors follow one another. + /// Instead of the first slice starting at 12 o'clock, rotate to some other angle. + /// Determines whether or not the sectors are reordered from largest to smallest. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Doughnut + ( + values: seq<#IConvertible>, + ?Name: string, + ?Hole: float, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Labels: seq<#IConvertible>, + ?Pull: float, + ?MultiPull: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?Direction: StyleParam.Direction, + ?Rotation: float, + ?Sort: bool, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let hole = Option.defaultValue 0.4 Hole + + Chart.Pie( + values, + Hole = hole, + ?Labels = Labels, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?MultiPull = MultiPull, + ?Pull = Pull, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?SectionColors = SectionColors, + ?SectionOutlineColor = SectionOutlineColor, + ?SectionOutlineWidth = SectionOutlineWidth, + ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, + ?SectionOutline = SectionOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?TextInfo = TextInfo, + ?Direction = Direction, + ?Rotation = Rotation, + ?Sort = Sort, + ?UseDefaults = UseDefaults + ) + + /// Creates a doughnut chart from encoded values and labels. + [] + static member Doughnut + ( + valuesEncoded: EncodedTypedArray, + ?labelsEncoded: EncodedTypedArray, + ?Hole: float, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Pull: float, + ?MultiPull: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?Direction: StyleParam.Direction, + ?Rotation: float, + ?Sort: bool, + ?UseDefaults: bool + ) = + + let hole = Option.defaultValue 0.4 Hole + + Chart.Pie( + valuesEncoded, + ?labelsEncoded = labelsEncoded, + Hole = hole, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?MultiPull = MultiPull, + ?Pull = Pull, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?SectionColors = SectionColors, + ?SectionOutlineColor = SectionOutlineColor, + ?SectionOutlineWidth = SectionOutlineWidth, + ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, + ?SectionOutline = SectionOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?TextInfo = TextInfo, + ?Direction = Direction, + ?Rotation = Rotation, + ?Sort = Sort, + ?UseDefaults = UseDefaults + ) + + + /// + /// Creates a doughnut chart. + /// + /// A doughnut chart is a variation of the pie chart that has a fraction cut from the center of the slices. + /// + /// Sets the values and labels of the sectors. If label entries are duplicated, the associated values are summed. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. + /// Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// Specifies the direction at which succeeding sectors follow one another. + /// Instead of the first slice starting at 12 o'clock, rotate to some other angle. + /// Determines whether or not the sectors are reordered from largest to smallest. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Doughnut + ( + valuesLabels: seq<#IConvertible * #IConvertible>, + ?Hole: float, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Pull: float, + ?MultiPull: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?Direction: StyleParam.Direction, + ?Rotation: float, + ?Sort: bool, + ?UseDefaults: bool + ) = + let values, labels = Seq.unzip valuesLabels + + Chart.Doughnut( + values, + Labels = labels, + ?Hole = Hole, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Pull = Pull, + ?MultiPull = MultiPull, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?SectionColors = SectionColors, + ?SectionOutlineColor = SectionOutlineColor, + ?SectionOutlineWidth = SectionOutlineWidth, + ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, + ?SectionOutline = SectionOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?TextInfo = TextInfo, + ?Direction = Direction, + ?Rotation = Rotation, + ?Sort = Sort, + ?UseDefaults = UseDefaults + ) + + + + /// + /// Creates a FunnelArea chart. + /// + /// FunnelArea charts visualize stages in a process using area-encoded trapezoids, which can be used to show data in a part-to-whole representation similar to a piechart, + /// wherein each item appears in a single stage. See also the "funnel" chart for a different approach to visualizing funnel data. + /// + /// Sets the values of the sectors + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets the sector labels. If `labels` entries are duplicated, the associated `values` are summed. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// + /// + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member FunnelArea + ( + values: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Labels: seq<#IConvertible>, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?AspectRatio: float, + ?BaseRatio: float, + ?UseDefaults: bool + ) = + + + let useDefaults = + defaultArg UseDefaults true + + let outline = + SectionOutline + |> Option.defaultValue (Line.init ()) + |> Line.style ( + ?Color = SectionOutlineColor, + ?Width = SectionOutlineWidth, + ?MultiWidth = SectionOutlineMultiWidth + ) + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style (?Colors = SectionColors, ?MultiOpacity = MultiOpacity, Outline = outline, Pattern = pattern) + + + TraceDomain.initFunnelArea ( + TraceDomainStyle.FunnelArea( + Values = values, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Labels = Labels, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + Marker = marker, + ?TextInfo = TextInfo, + ?AspectRatio = AspectRatio, + ?BaseRatio = BaseRatio + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a FunnelArea chart. + /// + /// FunnelArea charts visualize stages in a process using area-encoded trapezoids, which can be used to show data in a part-to-whole representation similar to a piechart, + /// wherein each item appears in a single stage. See also the "funnel" chart for a different approach to visualizing funnel data. + /// + /// Sets the values and labels of the sectors. If label entries are duplicated, the associated values are summed. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// + /// + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member FunnelArea + ( + valuesLabels: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?AspectRatio: float, + ?BaseRatio: float, + ?UseDefaults: bool + ) = + let values, labels = Seq.unzip valuesLabels + + Chart.FunnelArea( + values, + Labels = labels, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?SectionColors = SectionColors, + ?SectionOutlineColor = SectionOutlineColor, + ?SectionOutlineWidth = SectionOutlineWidth, + ?SectionOutlineMultiWidth = SectionOutlineMultiWidth, + ?SectionOutline = SectionOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?TextInfo = TextInfo, + ?AspectRatio = AspectRatio, + ?BaseRatio = BaseRatio, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a FunnelArea chart from encoded values and optional encoded labels. + /// + /// FunnelArea charts visualize stages in a process using area-encoded trapezoids, which can be used to show data in a part-to-whole representation similar to a piechart, + /// wherein each item appears in a single stage. See also the "funnel" chart for a different approach to visualizing funnel data. + /// + /// Sets the values of the sectors as an encoded typed array. + /// Sets the sector labels as an encoded typed array. If label entries are duplicated, the associated values are summed. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the positions of the `text` elements with respects to the (x,y) coordinates. + /// Sets the colors associated with each section. + /// Sets the color of the section outline. + /// Sets the width of the section outline. + /// Sets the width of each individual section outline. + /// Sets the section outline (use this for more finegrained control than the other section outline-associated arguments). + /// Sets a pattern shape for all sections + /// Sets an individual pattern shape for each section + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the sections (use this for more finegrained control than the other marker-associated arguments). + /// Determines which trace information appear on the graph. + /// + /// + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member FunnelArea + ( + valuesEncoded: EncodedTypedArray, + ?labelsEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?SectionColors: seq, + ?SectionOutlineColor: Color, + ?SectionOutlineWidth: float, + ?SectionOutlineMultiWidth: seq, + ?SectionOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?TextInfo: StyleParam.TextInfo, + ?AspectRatio: float, + ?BaseRatio: float, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let outline = + SectionOutline + |> Option.defaultValue (Line.init ()) + |> Line.style ( + ?Color = SectionOutlineColor, + ?Width = SectionOutlineWidth, + ?MultiWidth = SectionOutlineMultiWidth + ) + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style (?Colors = SectionColors, ?MultiOpacity = MultiOpacity, Outline = outline, Pattern = pattern) + + TraceDomain.initFunnelArea ( + TraceDomainStyle.FunnelArea( + ValuesEncoded = valuesEncoded, + ?LabelsEncoded = labelsEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + Marker = marker, + ?TextInfo = TextInfo, + ?AspectRatio = AspectRatio, + ?BaseRatio = BaseRatio + ) + ) + |> GenericChart.ofTraceObject useDefaults + + diff --git a/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Relations.fs b/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Relations.fs new file mode 100644 index 00000000..798eec8f --- /dev/null +++ b/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Relations.fs @@ -0,0 +1,441 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module ChartDomain_Relations = + + [] + type Chart = + /// + /// Creates a parallel coordinates plot. + /// + /// Parallel coordinates are a common way of visualizing and analyzing high-dimensional datasets. + /// + /// To show a set of points in an n-dimensional space, a backdrop is drawn consisting of n parallel lines, typically vertical and equally spaced. A point in n-dimensional space is represented as a polyline with vertices on the parallel axes; the position of the vertex on the i-th axis corresponds to the i-th coordinate of the point. + /// + /// This visualization is closely related to time series visualization, except that it is applied to data where the axes do not correspond to points in time, and therefore do not have a natural order. Therefore, different axis arrangements may be of interest. + /// + /// the dimensions of the plot, containing both dimension backdrop information and the associated data + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the color of the lines that are connecting the datums on the dimensions + /// Sets the colorscale of the lines that are connecting the datums on the dimensions + /// Whether or not to show the colorbar of the lines that are connecting the datums on the dimensions + /// Whether or not to reverse the colorscale of the lines that are connecting the datums on the dimensions + /// Sets the lines that are connecting the datums on the dimensions (use this for more finegrained control than the other line-associated arguments). + /// Sets the angle of the labels with respect to the horizontal. For example, a `tickangle` of -90 draws the labels vertically. Tilted labels with "labelangle" may be positioned better inside margins when `labelposition` is set to "bottom". + /// Sets the label font of this trace. + /// Specifies the location of the `label`. "top" positions labels above, next to the title "bottom" positions labels below the graph Tilted labels with "labelangle" may be positioned better inside margins when `labelposition` is set to "bottom". + /// Sets the range font of this trace. + /// Sets the tick font of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member ParallelCoord + ( + dimensions: seq, + ?Name: string, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?ShowLineColorScale: bool, + ?ReverseLineColorScale: bool, + ?Line: Line, + ?LabelAngle: int, + ?LabelFont: Font, + ?LabelSide: StyleParam.Side, + ?RangeFont: Font, + ?TickFont: Font, + ?UseDefaults: bool + ) = + let useDefaults = + defaultArg UseDefaults true + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Colorscale = LineColorScale, + ?ShowScale = ShowLineColorScale, + ?ReverseScale = ReverseLineColorScale + ) + + TraceDomain.initParallelCoord ( + TraceDomainStyle.ParallelCoord( + Dimensions = dimensions, + Line = line, + ?Name = Name, + ?LabelAngle = LabelAngle, + ?LabelFont = LabelFont, + ?LabelSide = LabelSide, + ?RangeFont = RangeFont, + ?TickFont = TickFont + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a parallel coordinates plot. + /// + /// Parallel coordinates are a common way of visualizing and analyzing high-dimensional datasets. + /// + /// To show a set of points in an n-dimensional space, a backdrop is drawn consisting of n parallel lines, typically vertical and equally spaced. A point in n-dimensional space is represented as a polyline with vertices on the parallel axes; the position of the vertex on the i-th axis corresponds to the i-th coordinate of the point. + /// + /// This visualization is closely related to time series visualization, except that it is applied to data where the axes do not correspond to points in time, and therefore do not have a natural order. Therefore, different axis arrangements may be of interest. + /// + /// Sets the values for each dimension of the plot, together with the name of the respective dimension + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the color of the lines that are connecting the datums on the dimensions + /// Sets the colorscale of the lines that are connecting the datums on the dimensions + /// Whether or not to show the colorbar of the lines that are connecting the datums on the dimensions + /// Whether or not to reverse the colorscale of the lines that are connecting the datums on the dimensions + /// Sets the lines that are connecting the datums on the dimensions (use this for more finegrained control than the other line-associated arguments). + /// Sets the angle of the labels with respect to the horizontal. For example, a `tickangle` of -90 draws the labels vertically. Tilted labels with "labelangle" may be positioned better inside margins when `labelposition` is set to "bottom". + /// Sets the label font of this trace. + /// Specifies the location of the `label`. "top" positions labels above, next to the title "bottom" positions labels below the graph Tilted labels with "labelangle" may be positioned better inside margins when `labelposition` is set to "bottom". + /// Sets the range font of this trace. + /// Sets the tick font of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member ParallelCoord + ( + keyValues: seq>, + ?Name: string, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?ShowLineColorScale: bool, + ?ReverseLineColorScale: bool, + ?Line: Line, + ?LabelAngle: int, + ?LabelFont: Font, + ?LabelSide: StyleParam.Side, + ?RangeFont: Font, + ?TickFont: Font, + ?UseDefaults: bool + ) = + + let dims = + keyValues |> Seq.map (fun (key, vals) -> Dimension.initParallel (Label = key, Values = vals)) + + Chart.ParallelCoord( + dimensions = dims, + ?Name = Name, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?ShowLineColorScale = ShowLineColorScale, + ?ReverseLineColorScale = ReverseLineColorScale, + ?Line = Line, + ?LabelAngle = LabelAngle, + ?LabelFont = LabelFont, + ?LabelSide = LabelSide, + ?RangeFont = RangeFont, + ?TickFont = TickFont, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a parallel categories plot. + /// + /// The parallel categories diagram (also known as parallel sets or alluvial diagram) is a visualization of + /// multi-dimensional categorical data sets. Each variable in the data set is represented by a column of rectangles, + /// where each rectangle corresponds to a discrete value taken on by that variable. + /// The relative heights of the rectangles reflect the relative frequency of occurrence of the corresponding value. + /// + /// the dimensions of the plot, containing both dimension backdrop information and the associated data + /// Sets the trace name. The trace name appear as the legend item and on hover + /// The number of observations represented by each state. Defaults to 1 so that each state represents one observation + /// Sets the color of the lines that are connecting the datums on the dimensions + /// Sets the shape of the lines that are connecting the datums on the dimensions + /// Sets the colorscale of the lines that are connecting the datums on the dimensions + /// Whether or not to show the colorbar of the lines that are connecting the datums on the dimensions + /// Whether or not to reverse the colorscale of the lines that are connecting the datums on the dimensions + /// Sets the lines that are connecting the datums on the dimensions (use this for more finegrained control than the other line-associated arguments). + /// Sets the drag interaction mode for categories and dimensions. If `perpendicular`, the categories can only move along a line perpendicular to the paths. If `freeform`, the categories can freely move on the plane. If `fixed`, the categories and dimensions are stationary. + /// Sort paths so that like colors are bundled together within each category. + /// Sets the path sorting algorithm. If `forward`, sort paths based on dimension categories from left to right. If `backward`, sort paths based on dimensions categories from right to left. + /// Sets the label font of this trace. + /// Sets the tick font of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member ParallelCategories + ( + dimensions: seq, + ?Name: string, + ?Counts: int, + ?LineColor: Color, + ?LineShape: StyleParam.Shape, + ?LineColorScale: StyleParam.Colorscale, + ?ShowLineColorScale: bool, + ?ReverseLineColorScale: bool, + ?Line: Line, + ?Arrangement: StyleParam.CategoryArrangement, + ?BundleColors: bool, + ?SortPaths: StyleParam.SortAlgorithm, + ?LabelFont: Font, + ?TickFont: Font, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Shape = LineShape, + ?Colorscale = LineColorScale, + ?ShowScale = ShowLineColorScale, + ?ReverseScale = ReverseLineColorScale + ) + + TraceDomain.initParallelCategories ( + TraceDomainStyle.ParallelCategories( + Dimensions = dimensions, + Line = line, + ?Name = Name, + ?Counts = Counts, + ?Arrangement = Arrangement, + ?BundleColors = BundleColors, + ?SortPaths = SortPaths, + ?LabelFont = LabelFont, + ?TickFont = TickFont + ) + ) + + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a parallel categories plot. + /// + /// The parallel categories diagram (also known as parallel sets or alluvial diagram) is a visualization of + /// multi-dimensional categorical data sets. Each variable in the data set is represented by a column of rectangles, + /// where each rectangle corresponds to a discrete value taken on by that variable. + /// The relative heights of the rectangles reflect the relative frequency of occurrence of the corresponding value. + /// + /// Sets the values for each dimension of the plot, together with the name of the respective dimension + /// Sets the trace name. The trace name appear as the legend item and on hover + /// The number of observations represented by each state. Defaults to 1 so that each state represents one observation + /// Sets the color of the lines that are connecting the datums on the dimensions + /// Sets the shape of the lines that are connecting the datums on the dimensions + /// Sets the colorscale of the lines that are connecting the datums on the dimensions + /// Whether or not to show the colorbar of the lines that are connecting the datums on the dimensions + /// Whether or not to reverse the colorscale of the lines that are connecting the datums on the dimensions + /// Sets the lines that are connecting the datums on the dimensions (use this for more finegrained control than the other line-associated arguments). + /// Sets the drag interaction mode for categories and dimensions. If `perpendicular`, the categories can only move along a line perpendicular to the paths. If `freeform`, the categories can freely move on the plane. If `fixed`, the categories and dimensions are stationary. + /// Sort paths so that like colors are bundled together within each category. + /// Sets the path sorting algorithm. If `forward`, sort paths based on dimension categories from left to right. If `backward`, sort paths based on dimensions categories from right to left. + /// Sets the label font of this trace. + /// Sets the tick font of this trace. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member ParallelCategories + ( + keyValues: seq>, + ?Name: string, + ?Counts: int, + ?LineColor: Color, + ?LineShape: StyleParam.Shape, + ?LineColorScale: StyleParam.Colorscale, + ?ShowLineColorScale: bool, + ?ReverseLineColorScale: bool, + ?Line: Line, + ?Arrangement: StyleParam.CategoryArrangement, + ?BundleColors: bool, + ?SortPaths: StyleParam.SortAlgorithm, + ?LabelFont: Font, + ?TickFont: Font, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let dims = + keyValues |> Seq.map (fun (key, vals) -> Dimension.initParallel (Label = key, Values = vals)) + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Shape = LineShape, + ?Colorscale = LineColorScale, + ?ShowScale = ShowLineColorScale, + ?ReverseScale = ReverseLineColorScale + ) + + TraceDomain.initParallelCategories ( + TraceDomainStyle.ParallelCategories( + Dimensions = dims, + Line = line, + ?Name = Name, + ?Counts = Counts, + ?Arrangement = Arrangement, + ?BundleColors = BundleColors, + ?SortPaths = SortPaths, + ?LabelFont = LabelFont, + ?TickFont = TickFont + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a sankey diagram. + /// + /// A Sankey diagram is a flow diagram, in which the width of arrows is proportional to the flow quantity. + /// + /// Sankey diagrams visualize the contributions to a flow by defining source to represent the source node, target for the target node, value to set the flow volume, and label that shows the node name. + /// + /// Sets the nodes of the Sankey plot. + /// Sets the links between nodes of the Sankey plot. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Assigns id labels to each datum. + /// Sets the orientation of the Sankey diagram. + /// Sets the text font of this trace. + /// If value is `snap` (the default), the node arrangement is assisted by automatic snapping of elements to preserve space between nodes specified via `nodepad`. If value is `perpendicular`, the nodes can only move along a line perpendicular to the flow. If value is `freeform`, the nodes can freely move on the plane. If value is `fixed`, the nodes are stationary. + /// Sets the value formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + /// Adds a unit to follow the value in the hover tooltip. Add a space if a separation is necessary from the value. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Sankey + ( + nodes: SankeyNodes, + links: SankeyLinks, + ?Name: string, + ?Ids: seq<#IConvertible>, + ?Orientation: StyleParam.Orientation, + ?TextFont: Font, + ?Arrangement: StyleParam.CategoryArrangement, + ?ValueFormat: string, + ?ValueSuffix: string, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + TraceDomain.initSankey ( + TraceDomainStyle.Sankey( + Node = nodes, + Link = links, + ?Name = Name, + ?Ids = Ids, + ?Orientation = Orientation, + ?TextFont = TextFont, + ?Arrangement = Arrangement, + ?ValueFormat = ValueFormat, + ?ValueSuffix = ValueSuffix + + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a sankey diagram. + /// + /// A Sankey diagram is a flow diagram, in which the width of arrows is proportional to the flow quantity. + /// + /// Sankey diagrams visualize the contributions to a flow by defining source to represent the source node, target for the target node, value to set the flow volume, and label that shows the node name. /// + /// Sets the labels of the nodes in the sankey diagram + /// (source, target) tuples which indicate connected nodes. These values map to the index in `nodeLabels` + /// The values for the links in the sankey diagram. + /// Sets the color of the nodes in the sankey diagram. + /// Sets the color of the node outlines in the sankey diagram. + /// Sets the outline width of the nodes in the sankey diagram. + /// Sets the thickness of the nodes in the sankey diagram. + /// Sets groups of nodes. Each group is defined by an array with the indices of the nodes it contains. Multiple groups can be specified. + /// Sets the color of the links in the sankey diagram. + /// Sets the colorscale of the links in the sankey diagram. + /// Sets the outline color of the links in the sankey diagram. + /// Sets the outline width of the links in the sankey diagram. + /// Sets the labels of the links in the sankey diagram. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Assigns id labels to each datum. + /// Sets the orientation of the Sankey diagram. + /// Sets the text font of this trace. + /// If value is `snap` (the default), the node arrangement is assisted by automatic snapping of elements to preserve space between nodes specified via `nodepad`. If value is `perpendicular`, the nodes can only move along a line perpendicular to the flow. If value is `freeform`, the nodes can freely move on the plane. If value is `fixed`, the nodes are stationary. + /// Sets the value formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + /// Adds a unit to follow the value in the hover tooltip. Add a space if a separation is necessary from the value. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Sankey + ( + nodeLabels: seq, + linkedNodeIds: seq, + linkValues: seq<#IConvertible>, + ?NodeColor: Color, + ?NodeOutlineColor: Color, + ?NodeOutlineWidth: float, + ?NodeThickness: int, + ?NodeGroups: seq<#seq>, + ?LinkColor: Color, + ?LinkColorScales: seq, + ?LinkOutlineColor: Color, + ?LinkOutlineWidth: float, + ?LinkLabels: seq, + ?Name: string, + ?Ids: seq<#IConvertible>, + ?Orientation: StyleParam.Orientation, + ?TextFont: Font, + ?Arrangement: StyleParam.CategoryArrangement, + ?ValueFormat: string, + ?ValueSuffix: string, + ?UseDefaults: bool + ) = + + let nodeOutline = + Line.init (?Color = NodeOutlineColor, ?Width = NodeOutlineWidth) + + let nodes = + SankeyNodes.init ( + Label = nodeLabels, + Line = nodeOutline, + ?Color = NodeColor, + ?Thickness = NodeThickness, + ?Groups = NodeGroups + ) + + let linkOutline = + Line.init (?Color = LinkOutlineColor, ?Width = LinkOutlineWidth) + + let sources, targets = + Seq.unzip linkedNodeIds + + let colorScales = + LinkColorScales + |> Option.map (fun c -> c |> Seq.map (fun cs -> SankeyLinkColorscale.init (ColorScale = cs))) + + let links = + SankeyLinks.init ( + Source = sources, + Target = targets, + Line = linkOutline, + Value = linkValues, + ?ColorScales = colorScales, + ?Color = LinkColor, + ?Label = LinkLabels + ) + + Chart.Sankey( + nodes, + links, + ?Name = Name, + ?Ids = Ids, + ?Orientation = Orientation, + ?TextFont = TextFont, + ?Arrangement = Arrangement, + ?ValueFormat = ValueFormat, + ?ValueSuffix = ValueSuffix, + ?UseDefaults = UseDefaults + ) + diff --git a/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Table.fs b/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Table.fs new file mode 100644 index 00000000..b8ee76fe --- /dev/null +++ b/src/Plotly.NET/ChartAPI/ChartDomain/ChartDomain_Table.fs @@ -0,0 +1,259 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module ChartDomain_Table = + + [] + type Chart = + /// + /// Creates a table. + /// + /// The data are arranged in a grid of rows and columns. Most styling can be specified for columns, rows or individual cells. Table is using a row-major order by default, ie. the grid is represented as a vector of row vectors. + /// + /// Sets the header of the table + /// Sets the cells of the table + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Specifies the rendered order of the data columns; for example, a value `2` at position `0` means that column index `0` in the data will be rendered as the third column, as columns have an index base of zero. + /// The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths. + /// The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Table + ( + header: TableHeader, + cells: TableCells, + ?Name: string, + ?ColumnOrder: seq, + ?ColumnWidth: float, + ?MultiColumnWidth: seq, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + TraceDomain.initTable ( + TraceDomainStyle.Table( + Header = header, + Cells = cells, + ?Name = Name, + ?ColumnOrder = ColumnOrder, + ?ColumnWidth = ColumnWidth, + ?MultiColumnWidth = MultiColumnWidth + + ) + ) + |> GenericChart.ofTraceObject useDefaults + + + /// + /// Creates a table. + /// + /// The data are arranged in a grid of rows and columns. Most styling can be specified for columns, rows or individual cells. Table is using a row-major order by default, ie. the grid is represented as a vector of row vectors. + /// + /// Sets the values contained in the table header. + /// Sets the values contained in the table cells. + /// Whether or not to transpose the cells (i.e. switch from row to column major) + /// Sets the alignment of the table header. + /// Sets the alignment of the individual cells in the table header. + /// Sets the fill color of the table header. + /// Sets the height of the table header. + /// Sets the outline color of the table header cells. + /// Sets the outline width of the table header cells. + /// Sets the outline width of the individual table header cells. + /// Sets the outline of the table header cells. (use this for more finegrained control than the other line-associated arguments). + /// Sets the alignment of the table cells. + /// Sets the alignment of the individual table cells. + /// Sets the fill color of the table cells. + /// Sets the height color of the table cells. + /// Sets the outline color color of the table cells. + /// Sets the outline width of the table cells. + /// Sets the outline width of the individual table cells. + /// Sets the outline of the table cells. (use this for more finegrained control than the other line-associated arguments). + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Specifies the rendered order of the data columns; for example, a value `2` at position `0` means that column index `0` in the data will be rendered as the third column, as columns have an index base of zero. + /// The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths. + /// The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member Table + ( + headerValues: seq<#seq<#IConvertible>>, + cellsValues: seq<#seq<#IConvertible>>, + ?TransposeCells: bool, + ?HeaderAlign: StyleParam.HorizontalAlign, + ?HeaderMultiAlign: seq, + ?HeaderFillColor: Color, + ?HeaderHeight: int, + ?HeaderOutlineColor: Color, + ?HeaderOutlineWidth: float, + ?HeaderOutlineMultiWidth: seq, + ?HeaderOutline: Line, + ?CellsAlign: StyleParam.HorizontalAlign, + ?CellsMultiAlign: seq, + ?CellsFillColor: Color, + ?CellsHeight: int, + ?CellsOutlineColor: Color, + ?CellsOutlineWidth: float, + ?CellsOutlineMultiWidth: seq, + ?CellsOutline: Line, + ?Name: string, + ?ColumnOrder: seq, + ?ColumnWidth: float, + ?MultiColumnWidth: seq, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let transpose = + defaultArg TransposeCells true + + let cellsValues = + if transpose then + cellsValues |> Seq.map Seq.cast |> Seq.transpose + else + cellsValues |> Seq.map Seq.cast + + let headerFill = + TableFill.init (?Color = HeaderFillColor) + + let headerOutline = + HeaderOutline + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = HeaderOutlineColor, + ?Width = HeaderOutlineWidth, + ?MultiWidth = HeaderOutlineMultiWidth + ) + + let header = + TableHeader.init ( + Values = headerValues, + Fill = headerFill, + Line = headerOutline, + ?Align = HeaderAlign, + ?MultiAlign = HeaderMultiAlign, + ?Height = HeaderHeight + ) + + let cellsFill = + TableFill.init (?Color = CellsFillColor) + + let cellsOutline = + CellsOutline + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = CellsOutlineColor, + ?Width = CellsOutlineWidth, + ?MultiWidth = CellsOutlineMultiWidth + ) + + let cells = + TableCells.init ( + Values = cellsValues, + Fill = cellsFill, + Line = cellsOutline, + ?Align = CellsAlign, + ?MultiAlign = CellsMultiAlign, + ?Height = CellsHeight + ) + + Chart.Table( + header, + cells, + ?Name = Name, + ?ColumnOrder = ColumnOrder, + ?ColumnWidth = ColumnWidth, + ?MultiColumnWidth = MultiColumnWidth, + ?UseDefaults = UseDefaults + + ) + + /// + /// Creates an Indicator chart. + /// + /// An indicator is used to visualize a single `value` along with some contextual information such as `steps` or a `threshold`, using a combination of three visual elements: a number, a delta, and/or a gauge. + /// Deltas are taken with respect to a `reference`. + /// Gauges can be either angular or bullet (aka linear) gauges. + /// + /// Sets the number to be displayed. + /// Determines how the value is displayed on the graph. `number` displays the value numerically in text. `delta` displays the difference to a reference value in text. Finally, `gauge` displays the value graphically on an axis. + /// Sets the Range of the Gauge axis + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Sets the title of this trace. + /// Sets the domain of this trace. + /// Sets the horizontal alignment of the `text` within the box. Note that this attribute has no effect if an angular gauge is displayed: in this case, it is always centered + /// + /// Sets how the delta to the delta reference is displayed + /// Sets the styles of the displayed number + /// Sets the shape of the gauge + /// Sets the styles of the gauge + /// Whether or not to show the gauge axis + /// Sets the gauge axis + /// + [] + static member Indicator + ( + value: IConvertible, + mode: StyleParam.IndicatorMode, + ?Range: StyleParam.Range, + ?Name: string, + ?Title: string, + ?Domain: Domain, + ?Align: StyleParam.IndicatorAlignment, + ?DeltaReference: #IConvertible, + ?Delta: IndicatorDelta, + ?Number: IndicatorNumber, + ?GaugeShape: StyleParam.IndicatorGaugeShape, + ?Gauge: IndicatorGauge, + ?ShowGaugeAxis: bool, + ?GaugeAxis: LinearAxis, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let axis = + GaugeAxis + |> Option.defaultValue (LinearAxis.init ()) + |> LinearAxis.style (?Range = Range, ?Visible = ShowGaugeAxis) + + let gauge = + Gauge + |> Option.defaultValue (IndicatorGauge.init ()) + |> IndicatorGauge.style (Axis = axis, ?Shape = GaugeShape) + + let delta = + Delta + |> Option.defaultValue (IndicatorDelta.init ()) + |> IndicatorDelta.style (?Reference = DeltaReference) + + TraceDomain.initIndicator ( + TraceDomainStyle.Indicator( + ?Name = Name, + ?Title = Title, + Mode = mode, + Value = value, + ?Domain = Domain, + ?Align = Align, + Delta = delta, + ?Number = Number, + Gauge = gauge + ) + ) + |> GenericChart.ofTraceObject useDefaults + diff --git a/src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Density.fs b/src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Density.fs new file mode 100644 index 00000000..bc1cfcb0 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Density.fs @@ -0,0 +1,380 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module ChartMap_Density = + + [] + type Chart = + /// + /// Creates a choropleth map using mapbox. + /// + /// A choropleth map is a type of thematic map in which a set of pre-defined areas is colored or patterned in proportion to a statistical variable that represents an aggregate summary of a geographic characteristic within each area, such as population density or per-capita income. + /// + /// GeoJSON features to be filled are set in `geojson` The data that describes the choropleth value-to-color mapping is set in `locations` and `z`. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location given. See `locationmode` for more info. + /// The color values for each location + /// Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type "FeatureCollection" or "Feature" with geometries of type "Polygon" or "MultiPolygon". + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the key in GeoJSON features which is used as id to match the items included in the `locations` array. Support nested property, for example "properties.name". + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorbar. + /// Sets the colorscale. + /// Determines whether or not a colorbar is displayed for this trace. + /// Reverses the color mapping if true. + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member ChoroplethMapbox + ( + locations: seq, + z: seq<#IConvertible>, + geoJson: obj, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?FeatureIdKey: string, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?Below: string, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let mapboxStyle = + defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap + + let mapbox = + Mapbox.init (Style = mapboxStyle) + + TraceMapbox.initChoroplethMapbox ( + TraceMapboxStyle.ChoroplethMapbox( + Locations = locations, + Z = z, + ?Name = Name, + ?ShowLegend = ShowLegend, + GeoJson = geoJson, + ?FeatureIdKey = FeatureIdKey, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?Below = Below + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) + + /// + /// Creates a choropleth map using mapbox from encoded color values. + /// + /// A choropleth map is a type of thematic map in which a set of pre-defined areas is colored or patterned in proportion to a statistical variable that represents an aggregate summary of a geographic characteristic within each area, such as population density or per-capita income. + /// + /// GeoJSON features to be filled are set in `geojson` The data that describes the choropleth value-to-color mapping is set in `locations` and `z`. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location given. See `locationmode` for more info. + /// The color values for each location as an encoded typed array. + /// Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type "FeatureCollection" or "Feature" with geometries of type "Polygon" or "MultiPolygon". + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the key in GeoJSON features which is used as id to match the items included in the `locations` array. Support nested property, for example "properties.name". + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorbar. + /// Sets the colorscale. + /// Determines whether or not a colorbar is displayed for this trace. + /// Reverses the color mapping if true. + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member ChoroplethMapbox + ( + locations: seq, + zEncoded: EncodedTypedArray, + geoJson: obj, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?FeatureIdKey: string, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?Below: string, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let mapboxStyle = + defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap + + let mapbox = + Mapbox.init (Style = mapboxStyle) + + TraceMapbox.initChoroplethMapbox ( + TraceMapboxStyle.ChoroplethMapbox( + Locations = locations, + ZEncoded = zEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + GeoJson = geoJson, + ?FeatureIdKey = FeatureIdKey, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?Below = Below + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) + + /// + /// Creates a DensityMapbox Chart that draws a bivariate kernel density estimation with a Gaussian kernel from `lon` and `lat` coordinates and optional `z` values using a colorscale. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the longitude coordinates (in degrees East). + /// Sets the latitude coordinates (in degrees North). + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opacity of the trace + /// Sets the points' weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot + /// Sets the radius of influence of one `lon` / `lat` point in pixels. Increasing the value makes the densitymapbox trace smoother, but less detailed. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorbar. + /// Sets the colorscale. + /// Determines whether or not a colorbar is displayed for this trace. + /// Reverses the color mapping if true. + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member DensityMapbox + ( + longitudes: seq<#IConvertible>, + latitudes: seq<#IConvertible>, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?Z: seq<#IConvertible>, + ?Radius: int, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?Below: string, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let mapboxStyle = + defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap + + let mapbox = + Mapbox.init (Style = mapboxStyle) + + TraceMapbox.initDensityMapbox ( + TraceMapboxStyle.DensityMapbox( + Lon = longitudes, + Lat = latitudes, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Z = Z, + ?Radius = Radius, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?Below = Below + + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) + + /// + /// Creates a DensityMapbox Chart that draws a bivariate kernel density estimation with a Gaussian kernel from `lon` and `lat` coordinates and optional `z` values using a colorscale. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the (longitude,latitude) coordinates (in degrees East, degrees North). + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opacity of the trace + /// Sets the points' weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot + /// Sets the radius of influence of one `lon` / `lat` point in pixels. Increasing the value makes the densitymapbox trace smoother, but less detailed. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorbar. + /// Sets the colorscale. + /// Determines whether or not a colorbar is displayed for this trace. + /// Reverses the color mapping if true. + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member DensityMapbox + ( + lonlat: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?Z: seq<#IConvertible>, + ?Radius: int, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?Below: string, + ?UseDefaults: bool + ) = + + let longitudes, latitudes = Seq.unzip lonlat + + Chart.DensityMapbox( + longitudes, + latitudes, + ?Name = Name, + ?MapboxStyle = MapboxStyle, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Z = Z, + ?Radius = Radius, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?Below = Below, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a DensityMapbox Chart from encoded longitude and latitude coordinates and optional encoded weights. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the longitude coordinates (in degrees East) as an encoded typed array. + /// Sets the latitude coordinates (in degrees North) as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover. + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opacity of the trace + /// Sets the points' weight as an encoded typed array. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot. + /// Sets the radius of influence of one `lon` / `lat` point in pixels. Increasing the value makes the densitymapbox trace smoother, but less detailed. + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the colorbar. + /// Sets the colorscale. + /// Determines whether or not a colorbar is displayed for this trace. + /// Reverses the color mapping if true. + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member DensityMapbox + ( + longitudesEncoded: EncodedTypedArray, + latitudesEncoded: EncodedTypedArray, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?zEncoded: EncodedTypedArray, + ?Radius: int, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?ColorBar: ColorBar, + ?ColorScale: StyleParam.Colorscale, + ?ShowScale: bool, + ?ReverseScale: bool, + ?Below: string, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let mapboxStyle = + defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap + + let mapbox = + Mapbox.init (Style = mapboxStyle) + + TraceMapbox.initDensityMapbox ( + TraceMapboxStyle.DensityMapbox( + LonEncoded = longitudesEncoded, + LatEncoded = latitudesEncoded, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?ZEncoded = zEncoded, + ?Radius = Radius, + ?Text = Text, + ?MultiText = MultiText, + ?ColorBar = ColorBar, + ?ColorScale = ColorScale, + ?ShowScale = ShowScale, + ?ReverseScale = ReverseScale, + ?Below = Below + + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) diff --git a/src/Plotly.NET/ChartAPI/ChartMap.fs b/src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Geo.fs similarity index 52% rename from src/Plotly.NET/ChartAPI/ChartMap.fs rename to src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Geo.fs index 1f9e8c6a..084ecafa 100644 --- a/src/Plotly.NET/ChartAPI/ChartMap.fs +++ b/src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Geo.fs @@ -1,4 +1,4 @@ -namespace Plotly.NET +namespace Plotly.NET open Plotly.NET.LayoutObjects open Plotly.NET.TraceObjects @@ -12,11 +12,10 @@ open System.Runtime.InteropServices open System.Runtime.CompilerServices [] -module ChartMap = +module ChartMap_Geo = [] type Chart = - /// /// Creates a choropleth map using plotly's base geo map. /// @@ -1507,1424 +1506,3 @@ module ChartMap = ) - /// - /// Creates a ScatterMapbox chart, where data is visualized on a geographic map using mapbox. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// ScatterMapbox charts are the basis of PointMapbox, LineMapbox, and BubbleMapbox Charts, and can be customized as such. We also provide abstractions for those: Chart.PointMapbox, Chart.LineMapbox, Chart.BubbleMapbox - /// - /// Sets the longitude coordinates (in degrees East). - /// Sets the latitude coordinates (in degrees North). - /// Determines the drawing mode for this scatter trace. - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// Whether or not to enable clustering for points - /// Sets the clustering options (use this for more finegrained control than the other cluster-associated arguments) - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member ScatterMapbox - ( - longitudes: seq<#IConvertible>, - latitudes: seq<#IConvertible>, - mode: StyleParam.Mode, - ?MapboxStyle: StyleParam.MapboxStyle, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?Below: string, - ?EnableClustering: bool, - ?Cluster: MapboxCluster, - ?UseDefaults: bool - ) = - - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity - ) - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Dash = LineDash, - ?Colorscale = LineColorScale, - ?Width = LineWidth - ) - - let cluster = - Cluster - |> Option.defaultValue (MapboxCluster.init ()) - |> MapboxCluster.style (?Enabled = EnableClustering) - - let mapboxStyle = - defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap - - let mapbox = - Mapbox.init (Style = mapboxStyle) - - TraceMapbox.initScatterMapbox ( - TraceMapboxStyle.ScatterMapbox( - Lon = longitudes, - Lat = latitudes, - Cluster = cluster, - Mode = mode, - Marker = marker, - Line = line, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Below = Below - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) - - /// - /// Creates a ScatterMapbox chart from encoded longitude and latitude coordinates. - /// - /// Sets the longitude coordinates (in degrees East) as an encoded typed array. - /// Sets the latitude coordinates (in degrees North) as an encoded typed array. - /// Determines the drawing mode for this scatter trace. - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// Whether or not to enable clustering for points - /// Sets the clustering options (use this for more finegrained control than the other cluster-associated arguments) - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member ScatterMapbox - ( - longitudesEncoded: EncodedTypedArray, - latitudesEncoded: EncodedTypedArray, - mode: StyleParam.Mode, - ?MapboxStyle: StyleParam.MapboxStyle, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?Below: string, - ?EnableClustering: bool, - ?Cluster: MapboxCluster, - ?UseDefaults: bool - ) = - - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity - ) - - let line = - Line - |> Option.defaultValue (Plotly.NET.Line.init ()) - |> Plotly.NET.Line.style ( - ?Color = LineColor, - ?Dash = LineDash, - ?Colorscale = LineColorScale, - ?Width = LineWidth - ) - - let cluster = - Cluster - |> Option.defaultValue (MapboxCluster.init ()) - |> MapboxCluster.style (?Enabled = EnableClustering) - - let mapboxStyle = - defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap - - let mapbox = - Mapbox.init (Style = mapboxStyle) - - TraceMapbox.initScatterMapbox ( - TraceMapboxStyle.ScatterMapbox( - LonEncoded = longitudesEncoded, - LatEncoded = latitudesEncoded, - Cluster = cluster, - Mode = mode, - Marker = marker, - Line = line, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Below = Below - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) - - /// - /// Creates a ScatterMapbox chart, where data is visualized on a geographic map using mapbox. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// ScatterMapbox charts are the basis of PointMapbox, LineMapbox, and BubbleMapbox Charts, and can be customized as such. We also provide abstractions for those: Chart.PointMapbox, Chart.LineMapbox, Chart.BubbleMapbox - /// - /// Sets the (longitude,latitude) coordinates (in degrees East, degrees North). - /// Determines the drawing mode for this scatter trace. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// Whether or not to enable clustering for points - /// Sets the clustering options (use this for more finegrained control than the other cluster-associated arguments) - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member ScatterMapbox - ( - lonlat: seq<#IConvertible * #IConvertible>, - mode: StyleParam.Mode, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?Below: string, - ?EnableClustering: bool, - ?Cluster: MapboxCluster, - ?UseDefaults: bool - ) = - - let longitudes, latitudes = Seq.unzip lonlat - - Chart.ScatterMapbox( - longitudes, - latitudes, - mode, - ?Name = Name, - ?MapboxStyle = MapboxStyle, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?Below = Below, - ?EnableClustering = EnableClustering, - ?Cluster = Cluster, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a PointMapbox chart, where data is visualized on a geographic map as points using mapbox. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the longitude coordinates (in degrees East). - /// Sets the latitude coordinates (in degrees North). - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// Whether or not to enable clustering for points - /// Sets the clustering options (use this for more finegrained control than the other cluster-associated arguments) - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member PointMapbox - ( - longitudes: seq<#IConvertible>, - latitudes: seq<#IConvertible>, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?Below: string, - ?EnableClustering: bool, - ?Cluster: MapboxCluster, - ?UseDefaults: bool - ) = - - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - Chart.ScatterMapbox( - longitudes, - latitudes, - mode = changeMode StyleParam.Mode.Markers, - ?Name = Name, - ?MapboxStyle = MapboxStyle, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?Below = Below, - ?EnableClustering = EnableClustering, - ?Cluster = Cluster, - ?UseDefaults = UseDefaults - - ) - - /// - /// Creates a PointMapbox chart, where data is visualized on a geographic map as points using mapbox. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the (longitude,latitude) coordinates (in degrees East, degrees North). - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// Whether or not to enable clustering for points - /// Sets the clustering options (use this for more finegrained control than the other cluster-associated arguments) - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member PointMapbox - ( - lonlat: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?Below: string, - ?EnableClustering: bool, - ?Cluster: MapboxCluster, - ?UseDefaults: bool - ) = - - let longitudes, latitudes = Seq.unzip lonlat - - Chart.PointMapbox( - longitudes, - latitudes, - ?Name = Name, - ?MapboxStyle = MapboxStyle, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?Below = Below, - ?EnableClustering = EnableClustering, - ?Cluster = Cluster, - ?UseDefaults = UseDefaults - ) - - /// Creates a PointMapbox chart from encoded longitude and latitude coordinates. - [] - static member PointMapbox - ( - longitudesEncoded: EncodedTypedArray, - latitudesEncoded: EncodedTypedArray, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?Below: string, - ?EnableClustering: bool, - ?Cluster: MapboxCluster, - ?UseDefaults: bool - ) = - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - Chart.ScatterMapbox( - longitudesEncoded, - latitudesEncoded, - mode = changeMode StyleParam.Mode.Markers, - ?Name = Name, - ?MapboxStyle = MapboxStyle, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?Below = Below, - ?EnableClustering = EnableClustering, - ?Cluster = Cluster, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a LineMapbox chart, where data is visualized on a geographic map connected by a line using mapbox. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the longitude coordinates (in degrees East). - /// Sets the latitude coordinates (in degrees North). - /// - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member LineMapbox - ( - longitudes: seq<#IConvertible>, - latitudes: seq<#IConvertible>, - ?ShowMarkers: bool, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?Below: string, - ?UseDefaults: bool - ) = - - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - Chart.ScatterMapbox( - longitudes, - latitudes, - mode = changeMode StyleParam.Mode.Lines, - ?Name = Name, - ?MapboxStyle = MapboxStyle, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?Below = Below, - ?UseDefaults = UseDefaults - ) - - /// Creates a LineMapbox chart from encoded longitude and latitude coordinates. - [] - static member LineMapbox - ( - longitudesEncoded: EncodedTypedArray, - latitudesEncoded: EncodedTypedArray, - ?ShowMarkers: bool, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?Below: string, - ?UseDefaults: bool - ) = - - let changeMode = - let isShowMarker = - match ShowMarkers with - | Some isShow -> isShow - | Option.None -> false - - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - >> StyleParam.ModeUtils.showMarker (isShowMarker) - - Chart.ScatterMapbox( - longitudesEncoded, - latitudesEncoded, - mode = changeMode StyleParam.Mode.Lines, - ?Name = Name, - ?MapboxStyle = MapboxStyle, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?Below = Below, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a LineMapbox chart, where data is visualized on a geographic map connected by a line using mapbox. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the (longitude,latitude) coordinates (in degrees East, degrees North). - /// - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Sets the color of the line - /// Sets the colorscale of the line - /// Sets the width of the line - /// sets the drawing style of the line - /// Sets the line (use this for more finegrained control than the other line-associated arguments) - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member LineMapbox - ( - lonlat: seq<#IConvertible * #IConvertible>, - ?ShowMarkers: bool, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?LineColor: Color, - ?LineColorScale: StyleParam.Colorscale, - ?LineWidth: float, - ?LineDash: StyleParam.DrawingStyle, - ?Line: Line, - ?Below: string, - ?UseDefaults: bool - ) = - - let longitudes, latitudes = Seq.unzip lonlat - - Chart.LineMapbox( - longitudes, - latitudes, - ?ShowMarkers = ShowMarkers, - ?Name = Name, - ?MapboxStyle = MapboxStyle, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?LineColor = LineColor, - ?LineColorScale = LineColorScale, - ?LineWidth = LineWidth, - ?LineDash = LineDash, - ?Line = Line, - ?Below = Below, - ?UseDefaults = UseDefaults - - ) - - /// - /// Creates a BubbleMapbox chart, where data is visualized on a geographic map as points using mapbox, additionally using the point size as a third dimension. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the longitude coordinates (in degrees East). - /// Sets the latitude coordinates (in degrees North). - /// Sets the size of the points. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member BubbleMapbox - ( - longitudes: seq<#IConvertible>, - latitudes: seq<#IConvertible>, - sizes: seq, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?Below: string, - ?UseDefaults: bool - ) = - - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity, - MultiSize = sizes - ) - - let mapboxStyle = - defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap - - let mapbox = - Mapbox.init (Style = mapboxStyle) - - TraceMapbox.initScatterMapbox ( - TraceMapboxStyle.ScatterMapbox( - Lon = longitudes, - Lat = latitudes, - Mode = changeMode StyleParam.Mode.Markers, - Marker = marker, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Below = Below - ) - ) - - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) - - /// Creates a BubbleMapbox chart from encoded longitude and latitude coordinates. - [] - static member BubbleMapbox - ( - longitudesEncoded: EncodedTypedArray, - latitudesEncoded: EncodedTypedArray, - sizes: seq, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?Below: string, - ?UseDefaults: bool - ) = - - let changeMode = - StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) - - let useDefaults = - defaultArg UseDefaults true - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - ?Outline = MarkerOutline, - ?Symbol = MarkerSymbol, - ?MultiSymbol = MultiMarkerSymbol, - ?Colorscale = MarkerColorScale, - ?MultiOpacity = MultiOpacity, - MultiSize = sizes - ) - - let mapboxStyle = - defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap - - let mapbox = - Mapbox.init (Style = mapboxStyle) - - TraceMapbox.initScatterMapbox ( - TraceMapboxStyle.ScatterMapbox( - LonEncoded = longitudesEncoded, - LatEncoded = latitudesEncoded, - Mode = changeMode StyleParam.Mode.Markers, - Marker = marker, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?Below = Below - ) - ) - - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) - - /// - /// Creates a BubbleMapbox chart, where data is visualized on a geographic map as points using mapbox, additionally using the point size as a third dimension. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the (longitude,latitude) coordinates (in degrees East, degrees North) together with the point size. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the position of text associated with each datum - /// Sets the position of text associated with individual datum - /// Sets the color of the marker - /// Sets the colorscale of the marker - /// Sets the outline of the marker - /// Sets the marker symbol for each datum - /// Sets the marker symbol for each individual datum - /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member BubbleMapbox - ( - lonlatsizes: seq<#IConvertible * #IConvertible * int>, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?TextPosition: StyleParam.TextPosition, - ?MultiTextPosition: seq, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerSymbol: StyleParam.MarkerSymbol, - ?MultiMarkerSymbol: seq, - ?Marker: Marker, - ?Below: string, - ?UseDefaults: bool - ) = - - let longitudes, latitudes, sizes = - Seq.unzip3 lonlatsizes - - Chart.BubbleMapbox( - longitudes, - latitudes, - sizes, - ?Name = Name, - ?MapboxStyle = MapboxStyle, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?TextPosition = TextPosition, - ?MultiTextPosition = MultiTextPosition, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerSymbol = MarkerSymbol, - ?MultiMarkerSymbol = MultiMarkerSymbol, - ?Marker = Marker, - ?Below = Below, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a choropleth map using mapbox. - /// - /// A choropleth map is a type of thematic map in which a set of pre-defined areas is colored or patterned in proportion to a statistical variable that represents an aggregate summary of a geographic characteristic within each area, such as population density or per-capita income. - /// - /// GeoJSON features to be filled are set in `geojson` The data that describes the choropleth value-to-color mapping is set in `locations` and `z`. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location given. See `locationmode` for more info. - /// The color values for each location - /// Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type "FeatureCollection" or "Feature" with geometries of type "Polygon" or "MultiPolygon". - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the key in GeoJSON features which is used as id to match the items included in the `locations` array. Support nested property, for example "properties.name". - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorbar. - /// Sets the colorscale. - /// Determines whether or not a colorbar is displayed for this trace. - /// Reverses the color mapping if true. - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member ChoroplethMapbox - ( - locations: seq, - z: seq<#IConvertible>, - geoJson: obj, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?FeatureIdKey: string, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?Below: string, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let mapboxStyle = - defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap - - let mapbox = - Mapbox.init (Style = mapboxStyle) - - TraceMapbox.initChoroplethMapbox ( - TraceMapboxStyle.ChoroplethMapbox( - Locations = locations, - Z = z, - ?Name = Name, - ?ShowLegend = ShowLegend, - GeoJson = geoJson, - ?FeatureIdKey = FeatureIdKey, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?Below = Below - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) - - /// - /// Creates a choropleth map using mapbox from encoded color values. - /// - /// A choropleth map is a type of thematic map in which a set of pre-defined areas is colored or patterned in proportion to a statistical variable that represents an aggregate summary of a geographic characteristic within each area, such as population density or per-capita income. - /// - /// GeoJSON features to be filled are set in `geojson` The data that describes the choropleth value-to-color mapping is set in `locations` and `z`. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location given. See `locationmode` for more info. - /// The color values for each location as an encoded typed array. - /// Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type "FeatureCollection" or "Feature" with geometries of type "Polygon" or "MultiPolygon". - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the key in GeoJSON features which is used as id to match the items included in the `locations` array. Support nested property, for example "properties.name". - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorbar. - /// Sets the colorscale. - /// Determines whether or not a colorbar is displayed for this trace. - /// Reverses the color mapping if true. - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member ChoroplethMapbox - ( - locations: seq, - zEncoded: EncodedTypedArray, - geoJson: obj, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?FeatureIdKey: string, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?Below: string, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let mapboxStyle = - defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap - - let mapbox = - Mapbox.init (Style = mapboxStyle) - - TraceMapbox.initChoroplethMapbox ( - TraceMapboxStyle.ChoroplethMapbox( - Locations = locations, - ZEncoded = zEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - GeoJson = geoJson, - ?FeatureIdKey = FeatureIdKey, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?Below = Below - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) - - /// - /// Creates a DensityMapbox Chart that draws a bivariate kernel density estimation with a Gaussian kernel from `lon` and `lat` coordinates and optional `z` values using a colorscale. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the longitude coordinates (in degrees East). - /// Sets the latitude coordinates (in degrees North). - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opacity of the trace - /// Sets the points' weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot - /// Sets the radius of influence of one `lon` / `lat` point in pixels. Increasing the value makes the densitymapbox trace smoother, but less detailed. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorbar. - /// Sets the colorscale. - /// Determines whether or not a colorbar is displayed for this trace. - /// Reverses the color mapping if true. - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member DensityMapbox - ( - longitudes: seq<#IConvertible>, - latitudes: seq<#IConvertible>, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?Z: seq<#IConvertible>, - ?Radius: int, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?Below: string, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let mapboxStyle = - defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap - - let mapbox = - Mapbox.init (Style = mapboxStyle) - - TraceMapbox.initDensityMapbox ( - TraceMapboxStyle.DensityMapbox( - Lon = longitudes, - Lat = latitudes, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Z = Z, - ?Radius = Radius, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?Below = Below - - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) - - /// - /// Creates a DensityMapbox Chart that draws a bivariate kernel density estimation with a Gaussian kernel from `lon` and `lat` coordinates and optional `z` values using a colorscale. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the (longitude,latitude) coordinates (in degrees East, degrees North). - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opacity of the trace - /// Sets the points' weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot - /// Sets the radius of influence of one `lon` / `lat` point in pixels. Increasing the value makes the densitymapbox trace smoother, but less detailed. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorbar. - /// Sets the colorscale. - /// Determines whether or not a colorbar is displayed for this trace. - /// Reverses the color mapping if true. - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member DensityMapbox - ( - lonlat: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?Z: seq<#IConvertible>, - ?Radius: int, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?Below: string, - ?UseDefaults: bool - ) = - - let longitudes, latitudes = Seq.unzip lonlat - - Chart.DensityMapbox( - longitudes, - latitudes, - ?Name = Name, - ?MapboxStyle = MapboxStyle, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Z = Z, - ?Radius = Radius, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?Below = Below, - ?UseDefaults = UseDefaults - ) - - /// - /// Creates a DensityMapbox Chart from encoded longitude and latitude coordinates and optional encoded weights. - /// - /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. - /// - /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. - /// - /// Sets the longitude coordinates (in degrees East) as an encoded typed array. - /// Sets the latitude coordinates (in degrees North) as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover. - /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opacity of the trace - /// Sets the points' weight as an encoded typed array. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot. - /// Sets the radius of influence of one `lon` / `lat` point in pixels. Increasing the value makes the densitymapbox trace smoother, but less detailed. - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the colorbar. - /// Sets the colorscale. - /// Determines whether or not a colorbar is displayed for this trace. - /// Reverses the color mapping if true. - /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member DensityMapbox - ( - longitudesEncoded: EncodedTypedArray, - latitudesEncoded: EncodedTypedArray, - ?Name: string, - ?MapboxStyle: StyleParam.MapboxStyle, - ?ShowLegend: bool, - ?Opacity: float, - ?zEncoded: EncodedTypedArray, - ?Radius: int, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?ColorBar: ColorBar, - ?ColorScale: StyleParam.Colorscale, - ?ShowScale: bool, - ?ReverseScale: bool, - ?Below: string, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let mapboxStyle = - defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap - - let mapbox = - Mapbox.init (Style = mapboxStyle) - - TraceMapbox.initDensityMapbox ( - TraceMapboxStyle.DensityMapbox( - LonEncoded = longitudesEncoded, - LatEncoded = latitudesEncoded, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?ZEncoded = zEncoded, - ?Radius = Radius, - ?Text = Text, - ?MultiText = MultiText, - ?ColorBar = ColorBar, - ?ColorScale = ColorScale, - ?ShowScale = ShowScale, - ?ReverseScale = ReverseScale, - ?Below = Below - - ) - ) - |> GenericChart.ofTraceObject useDefaults - |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) diff --git a/src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Mapbox.fs b/src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Mapbox.fs new file mode 100644 index 00000000..b7b19378 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/ChartMap/ChartMap_Mapbox.fs @@ -0,0 +1,1077 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module ChartMap_Mapbox = + + [] + type Chart = + /// + /// Creates a ScatterMapbox chart, where data is visualized on a geographic map using mapbox. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// ScatterMapbox charts are the basis of PointMapbox, LineMapbox, and BubbleMapbox Charts, and can be customized as such. We also provide abstractions for those: Chart.PointMapbox, Chart.LineMapbox, Chart.BubbleMapbox + /// + /// Sets the longitude coordinates (in degrees East). + /// Sets the latitude coordinates (in degrees North). + /// Determines the drawing mode for this scatter trace. + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// Whether or not to enable clustering for points + /// Sets the clustering options (use this for more finegrained control than the other cluster-associated arguments) + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member ScatterMapbox + ( + longitudes: seq<#IConvertible>, + latitudes: seq<#IConvertible>, + mode: StyleParam.Mode, + ?MapboxStyle: StyleParam.MapboxStyle, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?Below: string, + ?EnableClustering: bool, + ?Cluster: MapboxCluster, + ?UseDefaults: bool + ) = + + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity + ) + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Dash = LineDash, + ?Colorscale = LineColorScale, + ?Width = LineWidth + ) + + let cluster = + Cluster + |> Option.defaultValue (MapboxCluster.init ()) + |> MapboxCluster.style (?Enabled = EnableClustering) + + let mapboxStyle = + defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap + + let mapbox = + Mapbox.init (Style = mapboxStyle) + + TraceMapbox.initScatterMapbox ( + TraceMapboxStyle.ScatterMapbox( + Lon = longitudes, + Lat = latitudes, + Cluster = cluster, + Mode = mode, + Marker = marker, + Line = line, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Below = Below + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) + + /// + /// Creates a ScatterMapbox chart from encoded longitude and latitude coordinates. + /// + /// Sets the longitude coordinates (in degrees East) as an encoded typed array. + /// Sets the latitude coordinates (in degrees North) as an encoded typed array. + /// Determines the drawing mode for this scatter trace. + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// Whether or not to enable clustering for points + /// Sets the clustering options (use this for more finegrained control than the other cluster-associated arguments) + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member ScatterMapbox + ( + longitudesEncoded: EncodedTypedArray, + latitudesEncoded: EncodedTypedArray, + mode: StyleParam.Mode, + ?MapboxStyle: StyleParam.MapboxStyle, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?Below: string, + ?EnableClustering: bool, + ?Cluster: MapboxCluster, + ?UseDefaults: bool + ) = + + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity + ) + + let line = + Line + |> Option.defaultValue (Plotly.NET.Line.init ()) + |> Plotly.NET.Line.style ( + ?Color = LineColor, + ?Dash = LineDash, + ?Colorscale = LineColorScale, + ?Width = LineWidth + ) + + let cluster = + Cluster + |> Option.defaultValue (MapboxCluster.init ()) + |> MapboxCluster.style (?Enabled = EnableClustering) + + let mapboxStyle = + defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap + + let mapbox = + Mapbox.init (Style = mapboxStyle) + + TraceMapbox.initScatterMapbox ( + TraceMapboxStyle.ScatterMapbox( + LonEncoded = longitudesEncoded, + LatEncoded = latitudesEncoded, + Cluster = cluster, + Mode = mode, + Marker = marker, + Line = line, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Below = Below + ) + ) + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) + + /// + /// Creates a ScatterMapbox chart, where data is visualized on a geographic map using mapbox. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// ScatterMapbox charts are the basis of PointMapbox, LineMapbox, and BubbleMapbox Charts, and can be customized as such. We also provide abstractions for those: Chart.PointMapbox, Chart.LineMapbox, Chart.BubbleMapbox + /// + /// Sets the (longitude,latitude) coordinates (in degrees East, degrees North). + /// Determines the drawing mode for this scatter trace. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// Whether or not to enable clustering for points + /// Sets the clustering options (use this for more finegrained control than the other cluster-associated arguments) + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member ScatterMapbox + ( + lonlat: seq<#IConvertible * #IConvertible>, + mode: StyleParam.Mode, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?Below: string, + ?EnableClustering: bool, + ?Cluster: MapboxCluster, + ?UseDefaults: bool + ) = + + let longitudes, latitudes = Seq.unzip lonlat + + Chart.ScatterMapbox( + longitudes, + latitudes, + mode, + ?Name = Name, + ?MapboxStyle = MapboxStyle, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?Below = Below, + ?EnableClustering = EnableClustering, + ?Cluster = Cluster, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a PointMapbox chart, where data is visualized on a geographic map as points using mapbox. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the longitude coordinates (in degrees East). + /// Sets the latitude coordinates (in degrees North). + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// Whether or not to enable clustering for points + /// Sets the clustering options (use this for more finegrained control than the other cluster-associated arguments) + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member PointMapbox + ( + longitudes: seq<#IConvertible>, + latitudes: seq<#IConvertible>, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?Below: string, + ?EnableClustering: bool, + ?Cluster: MapboxCluster, + ?UseDefaults: bool + ) = + + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + Chart.ScatterMapbox( + longitudes, + latitudes, + mode = changeMode StyleParam.Mode.Markers, + ?Name = Name, + ?MapboxStyle = MapboxStyle, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?Below = Below, + ?EnableClustering = EnableClustering, + ?Cluster = Cluster, + ?UseDefaults = UseDefaults + + ) + + /// + /// Creates a PointMapbox chart, where data is visualized on a geographic map as points using mapbox. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the (longitude,latitude) coordinates (in degrees East, degrees North). + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// Whether or not to enable clustering for points + /// Sets the clustering options (use this for more finegrained control than the other cluster-associated arguments) + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member PointMapbox + ( + lonlat: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?Below: string, + ?EnableClustering: bool, + ?Cluster: MapboxCluster, + ?UseDefaults: bool + ) = + + let longitudes, latitudes = Seq.unzip lonlat + + Chart.PointMapbox( + longitudes, + latitudes, + ?Name = Name, + ?MapboxStyle = MapboxStyle, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?Below = Below, + ?EnableClustering = EnableClustering, + ?Cluster = Cluster, + ?UseDefaults = UseDefaults + ) + + /// Creates a PointMapbox chart from encoded longitude and latitude coordinates. + [] + static member PointMapbox + ( + longitudesEncoded: EncodedTypedArray, + latitudesEncoded: EncodedTypedArray, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?Below: string, + ?EnableClustering: bool, + ?Cluster: MapboxCluster, + ?UseDefaults: bool + ) = + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + Chart.ScatterMapbox( + longitudesEncoded, + latitudesEncoded, + mode = changeMode StyleParam.Mode.Markers, + ?Name = Name, + ?MapboxStyle = MapboxStyle, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?Below = Below, + ?EnableClustering = EnableClustering, + ?Cluster = Cluster, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a LineMapbox chart, where data is visualized on a geographic map connected by a line using mapbox. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the longitude coordinates (in degrees East). + /// Sets the latitude coordinates (in degrees North). + /// + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member LineMapbox + ( + longitudes: seq<#IConvertible>, + latitudes: seq<#IConvertible>, + ?ShowMarkers: bool, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?Below: string, + ?UseDefaults: bool + ) = + + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + Chart.ScatterMapbox( + longitudes, + latitudes, + mode = changeMode StyleParam.Mode.Lines, + ?Name = Name, + ?MapboxStyle = MapboxStyle, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?Below = Below, + ?UseDefaults = UseDefaults + ) + + /// Creates a LineMapbox chart from encoded longitude and latitude coordinates. + [] + static member LineMapbox + ( + longitudesEncoded: EncodedTypedArray, + latitudesEncoded: EncodedTypedArray, + ?ShowMarkers: bool, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?Below: string, + ?UseDefaults: bool + ) = + + let changeMode = + let isShowMarker = + match ShowMarkers with + | Some isShow -> isShow + | Option.None -> false + + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + >> StyleParam.ModeUtils.showMarker (isShowMarker) + + Chart.ScatterMapbox( + longitudesEncoded, + latitudesEncoded, + mode = changeMode StyleParam.Mode.Lines, + ?Name = Name, + ?MapboxStyle = MapboxStyle, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?Below = Below, + ?UseDefaults = UseDefaults + ) + + /// + /// Creates a LineMapbox chart, where data is visualized on a geographic map connected by a line using mapbox. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the (longitude,latitude) coordinates (in degrees East, degrees North). + /// + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Sets the color of the line + /// Sets the colorscale of the line + /// Sets the width of the line + /// sets the drawing style of the line + /// Sets the line (use this for more finegrained control than the other line-associated arguments) + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member LineMapbox + ( + lonlat: seq<#IConvertible * #IConvertible>, + ?ShowMarkers: bool, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?LineColor: Color, + ?LineColorScale: StyleParam.Colorscale, + ?LineWidth: float, + ?LineDash: StyleParam.DrawingStyle, + ?Line: Line, + ?Below: string, + ?UseDefaults: bool + ) = + + let longitudes, latitudes = Seq.unzip lonlat + + Chart.LineMapbox( + longitudes, + latitudes, + ?ShowMarkers = ShowMarkers, + ?Name = Name, + ?MapboxStyle = MapboxStyle, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?LineColor = LineColor, + ?LineColorScale = LineColorScale, + ?LineWidth = LineWidth, + ?LineDash = LineDash, + ?Line = Line, + ?Below = Below, + ?UseDefaults = UseDefaults + + ) + + /// + /// Creates a BubbleMapbox chart, where data is visualized on a geographic map as points using mapbox, additionally using the point size as a third dimension. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the longitude coordinates (in degrees East). + /// Sets the latitude coordinates (in degrees North). + /// Sets the size of the points. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member BubbleMapbox + ( + longitudes: seq<#IConvertible>, + latitudes: seq<#IConvertible>, + sizes: seq, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?Below: string, + ?UseDefaults: bool + ) = + + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity, + MultiSize = sizes + ) + + let mapboxStyle = + defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap + + let mapbox = + Mapbox.init (Style = mapboxStyle) + + TraceMapbox.initScatterMapbox ( + TraceMapboxStyle.ScatterMapbox( + Lon = longitudes, + Lat = latitudes, + Mode = changeMode StyleParam.Mode.Markers, + Marker = marker, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Below = Below + ) + ) + + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) + + /// Creates a BubbleMapbox chart from encoded longitude and latitude coordinates. + [] + static member BubbleMapbox + ( + longitudesEncoded: EncodedTypedArray, + latitudesEncoded: EncodedTypedArray, + sizes: seq, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?Below: string, + ?UseDefaults: bool + ) = + + let changeMode = + StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome) + + let useDefaults = + defaultArg UseDefaults true + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + ?Outline = MarkerOutline, + ?Symbol = MarkerSymbol, + ?MultiSymbol = MultiMarkerSymbol, + ?Colorscale = MarkerColorScale, + ?MultiOpacity = MultiOpacity, + MultiSize = sizes + ) + + let mapboxStyle = + defaultArg MapboxStyle StyleParam.MapboxStyle.OpenStreetMap + + let mapbox = + Mapbox.init (Style = mapboxStyle) + + TraceMapbox.initScatterMapbox ( + TraceMapboxStyle.ScatterMapbox( + LonEncoded = longitudesEncoded, + LatEncoded = latitudesEncoded, + Mode = changeMode StyleParam.Mode.Markers, + Marker = marker, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?Below = Below + ) + ) + + |> GenericChart.ofTraceObject useDefaults + |> GenericChart.addLayout (Layout.init () |> Layout.setMapbox (StyleParam.SubPlotId.Mapbox 1, mapbox)) + + /// + /// Creates a BubbleMapbox chart, where data is visualized on a geographic map as points using mapbox, additionally using the point size as a third dimension. + /// + /// Customize the mapbox layers, style, etc. by using Chart.withMapbox. + /// + /// You might need a Mapbox token, which you can also configure with Chart.withMapbox. + /// + /// Sets the (longitude,latitude) coordinates (in degrees East, degrees North) together with the point size. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets. + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the position of text associated with each datum + /// Sets the position of text associated with individual datum + /// Sets the color of the marker + /// Sets the colorscale of the marker + /// Sets the outline of the marker + /// Sets the marker symbol for each datum + /// Sets the marker symbol for each individual datum + /// Sets the marker (use this for more finegrained control than the other marker-associated arguments) + /// Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to "''". + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member BubbleMapbox + ( + lonlatsizes: seq<#IConvertible * #IConvertible * int>, + ?Name: string, + ?MapboxStyle: StyleParam.MapboxStyle, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?TextPosition: StyleParam.TextPosition, + ?MultiTextPosition: seq, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerSymbol: StyleParam.MarkerSymbol, + ?MultiMarkerSymbol: seq, + ?Marker: Marker, + ?Below: string, + ?UseDefaults: bool + ) = + + let longitudes, latitudes, sizes = + Seq.unzip3 lonlatsizes + + Chart.BubbleMapbox( + longitudes, + latitudes, + sizes, + ?Name = Name, + ?MapboxStyle = MapboxStyle, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?TextPosition = TextPosition, + ?MultiTextPosition = MultiTextPosition, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerSymbol = MarkerSymbol, + ?MultiMarkerSymbol = MultiMarkerSymbol, + ?Marker = Marker, + ?Below = Below, + ?UseDefaults = UseDefaults + ) + diff --git a/src/Plotly.NET/ChartAPI/ChartPolar/ChartPolar_Bar.fs b/src/Plotly.NET/ChartAPI/ChartPolar/ChartPolar_Bar.fs new file mode 100644 index 00000000..cf580ec1 --- /dev/null +++ b/src/Plotly.NET/ChartAPI/ChartPolar/ChartPolar_Bar.fs @@ -0,0 +1,256 @@ +namespace Plotly.NET + +open Plotly.NET.LayoutObjects +open Plotly.NET.TraceObjects + +open DynamicObj +open System +open System.IO + +open StyleParam +open System.Runtime.InteropServices +open System.Runtime.CompilerServices + +[] +module ChartPolar_Bar = + + [] + type Chart = + /// + /// Creates a polar bar chart. + /// + /// A polar bar chart is a chart that presents categorical data on a polar coordinate system with bars with radial height proportional to the values that they represent. + /// + /// Sets the radial height of the bars + /// sets the angular position of the bars + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale of the bars + /// Sets the color of the bar outline + /// Sets the pattern shape for all bars + /// Sets individual pattern shapes for the bars + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width (in position axis units) for each bar. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member BarPolar + ( + r: seq<#IConvertible>, + theta: seq<#IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidth: seq<#IConvertible>, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + Pattern = pattern, + ?MultiOpacity = MultiOpacity, + ?Colorscale = MarkerColorScale, + ?Outline = MarkerOutline + ) + + TracePolar.initBarPolar ( + TracePolarStyle.BarPolar( + R = r, + Theta = theta, + Marker = marker, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth + ) + ) + |> GenericChart.ofTraceObject useDefaults + + /// + /// Creates a polar bar chart. + /// + /// A polar bar chart is a chart that presents categorical data on a polar coordinate system with bars with radial height proportional to the values that they represent. + /// + /// Sets the radial height and angular position of the bars + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale of the bars + /// Sets the color of the bar outline + /// Sets the pattern shape for all bars + /// Sets individual pattern shapes for the bars + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width (in position axis units) for each bar. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member BarPolar + ( + rTheta: seq<#IConvertible * #IConvertible>, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidth: seq<#IConvertible>, + ?UseDefaults: bool + ) = + + let r, theta = Seq.unzip rTheta + + Chart.BarPolar( + r, + theta, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?MultiOpacity = MultiOpacity, + ?Text = Text, + ?MultiText = MultiText, + ?MarkerColor = MarkerColor, + ?MarkerColorScale = MarkerColorScale, + ?MarkerOutline = MarkerOutline, + ?MarkerPatternShape = MarkerPatternShape, + ?MultiMarkerPatternShape = MultiMarkerPatternShape, + ?MarkerPattern = MarkerPattern, + ?Marker = Marker, + ?Base = Base, + ?Width = Width, + ?MultiWidth = MultiWidth, + ?UseDefaults = UseDefaults + + ) + + /// + /// Creates a polar bar chart from encoded radial and angular coordinates. + /// + /// A polar bar chart is a chart that presents categorical data on a polar coordinate system with bars with radial height proportional to the values that they represent. + /// + /// Sets the radial height of the bars as an encoded typed array. + /// Sets the angular position of the bars as an encoded typed array. + /// Sets the trace name. The trace name appear as the legend item and on hover + /// Determines whether or not an item corresponding to this trace is shown in the legend. + /// Sets the opactity of the trace + /// Sets the opactity of individual datum markers + /// Sets a text associated with each datum + /// Sets individual text for each datum + /// Sets the color of the bars + /// Sets the colorscale of the bars + /// Sets the color of the bar outline + /// Sets the pattern shape for all bars + /// Sets individual pattern shapes for the bars + /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). + /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). + /// Sets where the bar base is drawn (in position axis units). + /// Sets the bar width (in position axis units) of all bars. + /// Sets the individual bar width (in position axis units) for each bar as an encoded typed array. + /// If set to false, ignore the global default settings set in `Defaults` + [] + static member BarPolar + ( + rEncoded: EncodedTypedArray, + thetaEncoded: EncodedTypedArray, + ?Name: string, + ?ShowLegend: bool, + ?Opacity: float, + ?MultiOpacity: seq, + ?Text: #IConvertible, + ?MultiText: seq<#IConvertible>, + ?MarkerColor: Color, + ?MarkerColorScale: StyleParam.Colorscale, + ?MarkerOutline: Line, + ?MarkerPatternShape: StyleParam.PatternShape, + ?MultiMarkerPatternShape: seq, + ?MarkerPattern: Pattern, + ?Marker: Marker, + ?Base: #IConvertible, + ?Width: #IConvertible, + ?MultiWidthEncoded: EncodedTypedArray, + ?UseDefaults: bool + ) = + + let useDefaults = + defaultArg UseDefaults true + + let pattern = + MarkerPattern + |> Option.defaultValue (TraceObjects.Pattern.init ()) + |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) + + let marker = + Marker + |> Option.defaultValue (TraceObjects.Marker.init ()) + |> TraceObjects.Marker.style ( + ?Color = MarkerColor, + Pattern = pattern, + ?MultiOpacity = MultiOpacity, + ?Colorscale = MarkerColorScale, + ?Outline = MarkerOutline + ) + + TracePolar.initBarPolar ( + TracePolarStyle.BarPolar( + REncoded = rEncoded, + ThetaEncoded = thetaEncoded, + Marker = marker, + ?Name = Name, + ?ShowLegend = ShowLegend, + ?Opacity = Opacity, + ?Text = Text, + ?MultiText = MultiText, + ?Base = Base, + ?Width = Width, + ?MultiWidthEncoded = MultiWidthEncoded + ) + ) + |> GenericChart.ofTraceObject useDefaults diff --git a/src/Plotly.NET/ChartAPI/ChartPolar.fs b/src/Plotly.NET/ChartAPI/ChartPolar/ChartPolar_Scatter.fs similarity index 83% rename from src/Plotly.NET/ChartAPI/ChartPolar.fs rename to src/Plotly.NET/ChartAPI/ChartPolar/ChartPolar_Scatter.fs index b8a29153..ac78069e 100644 --- a/src/Plotly.NET/ChartAPI/ChartPolar.fs +++ b/src/Plotly.NET/ChartAPI/ChartPolar/ChartPolar_Scatter.fs @@ -1,4 +1,4 @@ -namespace Plotly.NET +namespace Plotly.NET open Plotly.NET.LayoutObjects open Plotly.NET.TraceObjects @@ -12,7 +12,7 @@ open System.Runtime.InteropServices open System.Runtime.CompilerServices [] -module ChartPolar = +module ChartPolar_Scatter = [] type Chart = @@ -1279,241 +1279,3 @@ module ChartPolar = ) - /// - /// Creates a polar bar chart. - /// - /// A polar bar chart is a chart that presents categorical data on a polar coordinate system with bars with radial height proportional to the values that they represent. - /// - /// Sets the radial height of the bars - /// sets the angular position of the bars - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale of the bars - /// Sets the color of the bar outline - /// Sets the pattern shape for all bars - /// Sets individual pattern shapes for the bars - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member BarPolar - ( - r: seq<#IConvertible>, - theta: seq<#IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidth: seq<#IConvertible>, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - Pattern = pattern, - ?MultiOpacity = MultiOpacity, - ?Colorscale = MarkerColorScale, - ?Outline = MarkerOutline - ) - - TracePolar.initBarPolar ( - TracePolarStyle.BarPolar( - R = r, - Theta = theta, - Marker = marker, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth - ) - ) - |> GenericChart.ofTraceObject useDefaults - - /// - /// Creates a polar bar chart. - /// - /// A polar bar chart is a chart that presents categorical data on a polar coordinate system with bars with radial height proportional to the values that they represent. - /// - /// Sets the radial height and angular position of the bars - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale of the bars - /// Sets the color of the bar outline - /// Sets the pattern shape for all bars - /// Sets individual pattern shapes for the bars - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member BarPolar - ( - rTheta: seq<#IConvertible * #IConvertible>, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidth: seq<#IConvertible>, - ?UseDefaults: bool - ) = - - let r, theta = Seq.unzip rTheta - - Chart.BarPolar( - r, - theta, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?MultiOpacity = MultiOpacity, - ?Text = Text, - ?MultiText = MultiText, - ?MarkerColor = MarkerColor, - ?MarkerColorScale = MarkerColorScale, - ?MarkerOutline = MarkerOutline, - ?MarkerPatternShape = MarkerPatternShape, - ?MultiMarkerPatternShape = MultiMarkerPatternShape, - ?MarkerPattern = MarkerPattern, - ?Marker = Marker, - ?Base = Base, - ?Width = Width, - ?MultiWidth = MultiWidth, - ?UseDefaults = UseDefaults - - ) - - /// - /// Creates a polar bar chart from encoded radial and angular coordinates. - /// - /// A polar bar chart is a chart that presents categorical data on a polar coordinate system with bars with radial height proportional to the values that they represent. - /// - /// Sets the radial height of the bars as an encoded typed array. - /// Sets the angular position of the bars as an encoded typed array. - /// Sets the trace name. The trace name appear as the legend item and on hover - /// Determines whether or not an item corresponding to this trace is shown in the legend. - /// Sets the opactity of the trace - /// Sets the opactity of individual datum markers - /// Sets a text associated with each datum - /// Sets individual text for each datum - /// Sets the color of the bars - /// Sets the colorscale of the bars - /// Sets the color of the bar outline - /// Sets the pattern shape for all bars - /// Sets individual pattern shapes for the bars - /// Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments). - /// Sets the marker for the bars (use this for more finegrained control than the other marker-associated arguments). - /// Sets where the bar base is drawn (in position axis units). - /// Sets the bar width (in position axis units) of all bars. - /// Sets the individual bar width (in position axis units) for each bar as an encoded typed array. - /// If set to false, ignore the global default settings set in `Defaults` - [] - static member BarPolar - ( - rEncoded: EncodedTypedArray, - thetaEncoded: EncodedTypedArray, - ?Name: string, - ?ShowLegend: bool, - ?Opacity: float, - ?MultiOpacity: seq, - ?Text: #IConvertible, - ?MultiText: seq<#IConvertible>, - ?MarkerColor: Color, - ?MarkerColorScale: StyleParam.Colorscale, - ?MarkerOutline: Line, - ?MarkerPatternShape: StyleParam.PatternShape, - ?MultiMarkerPatternShape: seq, - ?MarkerPattern: Pattern, - ?Marker: Marker, - ?Base: #IConvertible, - ?Width: #IConvertible, - ?MultiWidthEncoded: EncodedTypedArray, - ?UseDefaults: bool - ) = - - let useDefaults = - defaultArg UseDefaults true - - let pattern = - MarkerPattern - |> Option.defaultValue (TraceObjects.Pattern.init ()) - |> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape) - - let marker = - Marker - |> Option.defaultValue (TraceObjects.Marker.init ()) - |> TraceObjects.Marker.style ( - ?Color = MarkerColor, - Pattern = pattern, - ?MultiOpacity = MultiOpacity, - ?Colorscale = MarkerColorScale, - ?Outline = MarkerOutline - ) - - TracePolar.initBarPolar ( - TracePolarStyle.BarPolar( - REncoded = rEncoded, - ThetaEncoded = thetaEncoded, - Marker = marker, - ?Name = Name, - ?ShowLegend = ShowLegend, - ?Opacity = Opacity, - ?Text = Text, - ?MultiText = MultiText, - ?Base = Base, - ?Width = Width, - ?MultiWidthEncoded = MultiWidthEncoded - ) - ) - |> GenericChart.ofTraceObject useDefaults diff --git a/src/Plotly.NET/ChartAPI/ChartSmith.fs b/src/Plotly.NET/ChartAPI/ChartSmith/ChartSmith_Scatter.fs similarity index 99% rename from src/Plotly.NET/ChartAPI/ChartSmith.fs rename to src/Plotly.NET/ChartAPI/ChartSmith/ChartSmith_Scatter.fs index 3622ddfc..d21d28df 100644 --- a/src/Plotly.NET/ChartAPI/ChartSmith.fs +++ b/src/Plotly.NET/ChartAPI/ChartSmith/ChartSmith_Scatter.fs @@ -1,4 +1,4 @@ -namespace Plotly.NET +namespace Plotly.NET open Plotly.NET.LayoutObjects open Plotly.NET.TraceObjects @@ -12,11 +12,10 @@ open System.Runtime.InteropServices open System.Runtime.CompilerServices [] -module ChartSmith = +module ChartSmith_Scatter = [] type Chart = - /// /// Creates a Scatter plot on a smith coordinate system. /// diff --git a/src/Plotly.NET/ChartAPI/ChartTernary.fs b/src/Plotly.NET/ChartAPI/ChartTernary/ChartTernary_Scatter.fs similarity index 99% rename from src/Plotly.NET/ChartAPI/ChartTernary.fs rename to src/Plotly.NET/ChartAPI/ChartTernary/ChartTernary_Scatter.fs index dce3ee29..137a0895 100644 --- a/src/Plotly.NET/ChartAPI/ChartTernary.fs +++ b/src/Plotly.NET/ChartAPI/ChartTernary/ChartTernary_Scatter.fs @@ -1,4 +1,4 @@ -namespace Plotly.NET +namespace Plotly.NET open Plotly.NET.LayoutObjects open Plotly.NET.TraceObjects @@ -12,11 +12,10 @@ open System.Runtime.InteropServices open System.Runtime.CompilerServices [] -module ChartTernary = +module ChartTernary_Scatter = [] type Chart = - /// /// Creates a Scatter plot on a ternary coordinate system /// diff --git a/src/Plotly.NET/Playground.fsx b/src/Plotly.NET/Playground.fsx index 702a7ef1..2a257bc6 100644 --- a/src/Plotly.NET/Playground.fsx +++ b/src/Plotly.NET/Playground.fsx @@ -150,14 +150,35 @@ #load "GenericChart.fs" #load "Chart.fs" -#load "Chart2D.fs" -#load "Chart3D.fs" -#load "ChartPolar.fs" -#load "ChartMap.fs" -#load "ChartTernary.fs" -#load "ChartCarpet.fs" -#load "ChartDomain.fs" -#load "ChartSmith.fs" +#load "Chart2D/Chart2D_Scatter.fs" +#load "Chart2D/Chart2D_Area.fs" +#load "Chart2D/Chart2D_Funnel.fs" +#load "Chart2D/Chart2D_Bar.fs" +#load "Chart2D/Chart2D_Histogram.fs" +#load "Chart2D/Chart2D_Distribution.fs" +#load "Chart2D/Chart2D_Heatmap.fs" +#load "Chart2D/Chart2D_Finance.fs" +#load "Chart2D/Chart2D_Splom.fs" +#load "Chart2D/Chart2D_Statistical.fs" +#load "Chart3D/Chart3D_Scatter.fs" +#load "Chart3D/Chart3D_Surface.fs" +#load "Chart3D/Chart3D_VectorField.fs" +#load "Chart3D/Chart3D_Volume.fs" +#load "ChartPolar/ChartPolar_Scatter.fs" +#load "ChartPolar/ChartPolar_Bar.fs" +#load "ChartMap/ChartMap_Geo.fs" +#load "ChartMap/ChartMap_Mapbox.fs" +#load "ChartMap/ChartMap_Density.fs" +#load "ChartTernary/ChartTernary_Scatter.fs" +#load "ChartCarpet/ChartCarpet_Base.fs" +#load "ChartCarpet/ChartCarpet_Scatter.fs" +#load "ChartCarpet/ChartCarpet_Contour.fs" +#load "ChartDomain/ChartDomain_Pie.fs" +#load "ChartDomain/ChartDomain_Hierarchy.fs" +#load "ChartDomain/ChartDomain_Relations.fs" +#load "ChartDomain/ChartDomain_Table.fs" +#load "ChartDomain/ChartDomain_Icicle.fs" +#load "ChartSmith/ChartSmith_Scatter.fs" #I "CSharpLayer" diff --git a/src/Plotly.NET/Plotly.NET.fsproj b/src/Plotly.NET/Plotly.NET.fsproj index 972b9b84..994b104a 100644 --- a/src/Plotly.NET/Plotly.NET.fsproj +++ b/src/Plotly.NET/Plotly.NET.fsproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -160,14 +160,35 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -176,3 +197,5 @@ + + From 8efb364db5550283d50ea4afa1df53eed29a90c4 Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Thu, 16 Apr 2026 11:50:10 +0200 Subject: [PATCH 3/3] fix wrong chartdomain call in testbase --- tests/Common/FSharpTestBase/TestCharts/ChartDomainTestCharts.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Common/FSharpTestBase/TestCharts/ChartDomainTestCharts.fs b/tests/Common/FSharpTestBase/TestCharts/ChartDomainTestCharts.fs index 4cc3716f..f46f0470 100644 --- a/tests/Common/FSharpTestBase/TestCharts/ChartDomainTestCharts.fs +++ b/tests/Common/FSharpTestBase/TestCharts/ChartDomainTestCharts.fs @@ -398,7 +398,7 @@ module Indicator = open Plotly.NET.LayoutObjects let ``Angular gauge indicator`` = - ChartDomain.Chart.Indicator( + Chart.Indicator( value = 200., mode = StyleParam.IndicatorMode.NumberDeltaGauge, Delta = IndicatorDelta.init(Reference=160),