Skip to content

Commit

Permalink
plotly.js v2.25:
Browse files Browse the repository at this point in the history
- Add "Equal Earth" projection to geo subplots
- Complete bindings for geo projections
- Add options to include legends for shapes and newshape
- add tests
  • Loading branch information
kMutagene committed Oct 25, 2023
1 parent f75125e commit 0ea7d3e
Show file tree
Hide file tree
Showing 16 changed files with 526 additions and 140 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Build and test](https://github.com/plotly/Plotly.NET/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/plotly/Plotly.NET/actions/workflows/build-and-test.yml)
[![](https://img.shields.io/nuget/vpre/Plotly.NET)](https://www.nuget.org/packages/Plotly.NET/)
[![Discord](https://img.shields.io/discord/836161044501889064?color=purple&label=Join%20our%20Discord%21&logo=discord&logoColor=white)](https://discord.gg/k3kUtFY8DB)
![](https://img.shields.io/badge/supported%20plotly.js%20version-2.24.3-blue)
![](https://img.shields.io/badge/supported%20plotly.js%20version-2.25.2-blue)
[![DOI](https://img.shields.io/badge/DOI-10.12688%2Ff1000research.123971.1-brightgreen)](https://doi.org/10.12688/f1000research.123971.1)

### Table of contents
Expand Down
218 changes: 171 additions & 47 deletions src/Plotly.NET/CommonAbstractions/StyleParams.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1348,53 +1348,177 @@ module StyleParam =

[<RequireQualifiedAccess>]
type GeoProjectionType =
| EquiRectangular
| Mercator
| Orthographic
| NaturalEarth
| Kavrayskiy7
| Miller
| Robinson
| Eckert4
| AzimuthalEqualArea
| AzimuthalEquidistant
| ConicEqualArea
| ConicConformal
| ConicEquidistant
| Gnomonic
| Stereographic
| Mollweide
| Hammer
| TransverseMercator
| AlbersUSA
| WinkelTripel
| Aitoff
| Sinusoidal

static member toString =
function
| EquiRectangular -> "equirectangular"
| Mercator -> "mercator"
| Orthographic -> "orthographic"
| NaturalEarth -> "natural earth"
| Kavrayskiy7 -> "kavrayskiy7"
| Miller -> "miller"
| Robinson -> "robinson"
| Eckert4 -> "eckert4"
| AzimuthalEqualArea -> "azimuthal equal area"
| AzimuthalEquidistant -> "azimuthal equidistant"
| ConicEqualArea -> "conic equal area"
| ConicConformal -> "conic conformal"
| ConicEquidistant -> "conic equidistant"
| Gnomonic -> "gnomonic"
| Stereographic -> "stereographic"
| Mollweide -> "mollweide"
| Hammer -> "hammer"
| TransverseMercator -> "transverse mercator"
| AlbersUSA -> "albers usa"
| WinkelTripel -> "winkel tripel"
| Aitoff -> "aitoff"
| Sinusoidal -> "sinusoidal"
| Airy
| Aitoff
| Albers
| AlbersUSA
| August
| AzimuthalEqualArea
| AzimuthalEquidistant
| Baker
| Bertin1953
| Boggs
| Bonne
| Bottomley
| Bromley
| Collignon
| ConicConformal
| ConicEqualArea
| ConicEquidistant
| Craig
| Craster
| CylindricalEqualArea
| CylindricalStereographic
| Eckert1
| Eckert2
| Eckert3
| Eckert4
| Eckert5
| Eckert6
| Eisenlohr
| EqualEarth
| Equirectangular
| Fahey
| Foucaut
| FoucautSinusoidal
| Ginzburg4
| Ginzburg5
| Ginzburg6
| Ginzburg8
| Ginzburg9
| Gnomonic
| Gringorten
| GringortenQuincuncial
| Guyou
| Hammer
| Hill
| Homolosine
| Hufnagel
| Hyperelliptical
| Kavrayskiy7
| Lagrange
| Larrivee
| Laskowski
| Loximuthal
| Mercator
| Miller
| Mollweide
| MtFlatPolarParabolic
| MtFlatPolarQuartic
| MtFlatPolarSinusoidal
| NaturalEarth
| NaturalEarth1
| NaturalEarth2
| NellHammer
| Nicolosi
| Orthographic
| Patterson
| PeirceQuincuncial
| Polyconic
| RectangularPolyconic
| Robinson
| Satellite
| SinuMollweide
| Sinusoidal
| Stereographic
| Times
| TransverseMercator
| VanDerGrinten
| VanDerGrinten2
| VanDerGrinten3
| VanDerGrinten4
| Wagner4
| Wagner6
| Wiechel
| WinkelTripel
| Winkel3

static member toString =
function
| Airy -> "airy"
| Aitoff -> "aitoff"
| Albers -> "albers"
| AlbersUSA -> "albers usa"
| August -> "august"
| AzimuthalEqualArea -> "azimuthal equal area"
| AzimuthalEquidistant -> "azimuthal equidistant"
| Baker -> "baker"
| Bertin1953 -> "bertin1953"
| Boggs -> "boggs"
| Bonne -> "bonne"
| Bottomley -> "bottomley"
| Bromley -> "bromley"
| Collignon -> "collignon"
| ConicConformal -> "conic conformal"
| ConicEqualArea -> "conic equal area"
| ConicEquidistant -> "conic equidistant"
| Craig -> "craig"
| Craster -> "craster"
| CylindricalEqualArea -> "cylindrical equal area"
| CylindricalStereographic -> "cylindrical stereographic"
| Eckert1 -> "eckert1"
| Eckert2 -> "eckert2"
| Eckert3 -> "eckert3"
| Eckert4 -> "eckert4"
| Eckert5 -> "eckert5"
| Eckert6 -> "eckert6"
| Eisenlohr -> "eisenlohr"
| EqualEarth -> "equal earth"
| Equirectangular -> "equirectangular"
| Fahey -> "fahey"
| Foucaut -> "foucaut"
| FoucautSinusoidal -> "foucaut sinusoidal"
| Ginzburg4 -> "ginzburg4"
| Ginzburg5 -> "ginzburg5"
| Ginzburg6 -> "ginzburg6"
| Ginzburg8 -> "ginzburg8"
| Ginzburg9 -> "ginzburg9"
| Gnomonic -> "gnomonic"
| Gringorten -> "gringorten"
| GringortenQuincuncial -> "gringorten quincuncial"
| Guyou -> "guyou"
| Hammer -> "hammer"
| Hill -> "hill"
| Homolosine -> "homolosine"
| Hufnagel -> "hufnagel"
| Hyperelliptical -> "hyperelliptical"
| Kavrayskiy7 -> "kavrayskiy7"
| Lagrange -> "lagrange"
| Larrivee -> "larrivee"
| Laskowski -> "laskowski"
| Loximuthal -> "loximuthal"
| Mercator -> "mercator"
| Miller -> "miller"
| Mollweide -> "mollweide"
| MtFlatPolarParabolic -> "mt flat polar parabolic"
| MtFlatPolarQuartic -> "mt flat polar quartic"
| MtFlatPolarSinusoidal -> "mt flat polar sinusoidal"
| NaturalEarth -> "natural earth"
| NaturalEarth1 -> "natural earth1"
| NaturalEarth2 -> "natural earth2"
| NellHammer -> "nell hammer"
| Nicolosi -> "nicolosi"
| Orthographic -> "orthographic"
| Patterson -> "patterson"
| PeirceQuincuncial -> "peirce quincuncial"
| Polyconic -> "polyconic"
| RectangularPolyconic -> "rectangular polyconic"
| Robinson -> "robinson"
| Satellite -> "satellite"
| SinuMollweide -> "sinu mollweide"
| Sinusoidal -> "sinusoidal"
| Stereographic -> "stereographic"
| Times -> "times"
| TransverseMercator -> "transverse mercator"
| VanDerGrinten -> "van der grinten"
| VanDerGrinten2 -> "van der grinten2"
| VanDerGrinten3 -> "van der grinten3"
| VanDerGrinten4 -> "van der grinten4"
| Wagner4 -> "wagner4"
| Wagner6 -> "wagner6"
| Wiechel -> "wiechel"
| WinkelTripel -> "winkel tripel"
| Winkel3 -> "winkel3"

static member convert =
GeoProjectionType.toString >> box
Expand Down
2 changes: 1 addition & 1 deletion src/Plotly.NET/Globals.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ open Giraffe.ViewEngine

/// The plotly js version loaded from cdn in rendered html docs
[<Literal>]
let PLOTLYJS_VERSION = "2.24.3"
let PLOTLYJS_VERSION = "2.25.2"

[<Literal>]
let SCRIPT_TEMPLATE =
Expand Down
Loading

0 comments on commit 0ea7d3e

Please sign in to comment.