Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/05_0_geo-vs-mapbox.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ In the default plotly template, a map frame and physical features such as a coas
open Plotly.NET

let baseMapOnly =
Chart.PointGeo([]) // deliberately empty chart to show the base map only
Chart.PointGeo(locations = []) // deliberately empty chart to show the base map only
|> Chart.withMarginSize(0,0,0,0)

(*** condition: ipynb ***)
Expand Down Expand Up @@ -84,7 +84,7 @@ let myGeo =
)

let moreFeaturesBaseMap =
Chart.PointGeo([])
Chart.PointGeo(locations = [])
|> Chart.withGeo myGeo
|> Chart.withMarginSize(0,0,0,0)

Expand Down Expand Up @@ -119,7 +119,7 @@ let countryGeo =


let countryBaseMap =
Chart.PointGeo([])
Chart.PointGeo(locations = [])
|> Chart.withGeo countryGeo
|> Chart.withMarginSize(0,0,0,0)

Expand Down
4 changes: 2 additions & 2 deletions docs/05_1_geo-plots.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let pointGeo =
Chart.PointGeo(
lon,
lat,
Labels=cityNames,
MultiText=cityNames,
TextPosition=StyleParam.TextPosition.TopCenter
)
|> Chart.withGeoStyle(
Expand Down Expand Up @@ -106,7 +106,7 @@ let flights =
Chart.LineGeo(
[startCoords; endCoords],
Opacity = opacityVals.[i],
Color = Color.fromString "red"
MarkerColor = Color.fromString "red"
)
)
|> Chart.combine
Expand Down
6 changes: 3 additions & 3 deletions docs/05_2_choropleth-map.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ patterns across the displayed location.
let choroplethMap1 =
Chart.ChoroplethMap(
locations,z,
Locationmode=StyleParam.LocationFormat.CountryNames
LocationMode=StyleParam.LocationFormat.CountryNames
)

(*** condition: ipynb ***)
Expand All @@ -118,7 +118,7 @@ open Plotly.NET.LayoutObjects
let choroplethMap2 =
Chart.ChoroplethMap(
locations,z,
Locationmode=StyleParam.LocationFormat.CountryNames
LocationMode=StyleParam.LocationFormat.CountryNames
)
|> Chart.withGeoStyle(
Projection=GeoProjection.init(projectionType=StyleParam.GeoProjectionType.Mollweide),
Expand Down Expand Up @@ -235,7 +235,7 @@ let choroplethGeoJSON =
Chart.ChoroplethMap(
locations = locationsGeoJSON,
z = zGeoJSON,
Locationmode=StyleParam.LocationFormat.GeoJson_Id,
LocationMode=StyleParam.LocationFormat.GeoJson_Id,
GeoJson = geoJson,
FeatureIdKey="id"
)
Expand Down
1,119 changes: 506 additions & 613 deletions src/Plotly.NET/ChartAPI/ChartMap.fs

Large diffs are not rendered by default.

21 changes: 16 additions & 5 deletions src/Plotly.NET/Templates/ChartTemplates.fs
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,23 @@ module ChartTemplates =
)
))

TraceGeo.initChoroplethMap(TraceGeoStyle.ChoroplethMap(
ColorBar = ColorBar.init(
OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty
TraceGeo.initChoroplethMap(
TraceGeoStyle.ChoroplethMap(
ColorBar = ColorBar.init(OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty),
ColorScale = StyleParam.Colorscale.Custom [
0.0 , "#0d0887"
0.1111111111111111 , "#46039f"
0.2222222222222222 , "#7201a8"
0.3333333333333333 , "#9c179e"
0.4444444444444444 , "#bd3786"
0.5555555555555556 , "#d8576b"
0.6666666666666666 , "#ed7953"
0.7777777777777778 , "#fb9f3a"
0.8888888888888888 , "#fdca26"
1.0 , "#f0f921"
]
)
))

)
Trace2D.initContour(Trace2DStyle.Contour(
ColorBar = ColorBar.init(
OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty
Expand Down
Loading