forked from plotly/Plotly.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChartMap.cs
More file actions
108 lines (107 loc) · 6.85 KB
/
ChartMap.cs
File metadata and controls
108 lines (107 loc) · 6.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Plotly.NET;
using Plotly.NET.LayoutObjects;
using Plotly.NET.TraceObjects;
namespace Plotly.NET.CSharp
{
public static partial class Chart
{
/// <summary>
/// Creates a ScatterGeo chart, where data is visualized using plotly's base geo map.
///
/// In general, ScatterGeo Plots plot two-dimensional data on a geo map via (lat,lon) coordinates.
///
/// ScatterGeo charts are the basis of PointGeo, LineGeo, and BubbleGeo Charts, and can be customized as such. We also provide abstractions for those: Chart.PointGeo, Chart.LineGeo, Chart.BubbleGeo
/// </summary>
/// <param name="longitudes">Sets the longitude coordinates (in degrees East).</param>
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
/// <param name="mode">Determines the drawing mode for this scatter trace.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
/// <param name="MarkerColor">Sets the color of the marker</param>
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
/// <param name="MarkerOutline">Sets the outline of the marker</param>
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
/// <param name="LineColor">Sets the color of the line</param>
/// <param name="LineColorScale">Sets the colorscale of the line</param>
/// <param name="LineWidth">Sets the width of the line</param>
/// <param name="LineDash">sets the drawing style of the line</param>
/// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param>
/// <param name="LocationMode">Determines the set of locations used to match entries in `locations` to regions on the map. Values "ISO-3", "USA-states", "country names" correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to the `geojson` attribute.</param>
/// <param name="GeoJson">Sets optional GeoJSON data associated with this trace. If not given, the features on the base map are used. 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".</param>
/// <param name="FeatureIdKey">Sets the key in GeoJSON features which is used as id to match the items included in the `locations` array. Only has an effect when `geojson` is set. Support nested property, for example "properties.name".</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
public static GenericChart.GenericChart ScatterGeo<LongitudesType, LatitudesType, TextType>(
IEnumerable<LongitudesType> longitudes,
IEnumerable<LatitudesType> latitudes,
StyleParam.Mode mode,
string? Name = null,
bool? ShowLegend = null,
double? Opacity = null,
IEnumerable<double>? MultiOpacity = null,
TextType? Text = null,
IEnumerable<TextType>? MultiText = null,
StyleParam.TextPosition? TextPosition = null,
IEnumerable<StyleParam.TextPosition>? MultiTextPosition = null,
Color? MarkerColor = null,
StyleParam.Colorscale? MarkerColorScale = null,
Line? MarkerOutline = null,
StyleParam.MarkerSymbol? MarkerSymbol = null,
IEnumerable<StyleParam.MarkerSymbol>? MultiMarkerSymbol = null,
Marker? Marker = null,
Color? LineColor = null,
StyleParam.Colorscale? LineColorScale = null,
double? LineWidth = null,
StyleParam.DrawingStyle? LineDash = null,
Line? Line = null,
StyleParam.LocationFormat? LocationMode = null,
Object? GeoJson = null,
string? FeatureIdKey = null,
bool? UseDefaults = null
)
where LongitudesType : IConvertible
where LatitudesType : IConvertible
where TextType : class, IConvertible
=>
Plotly.NET.ChartMap.Chart.ScatterGeo<LongitudesType, LatitudesType, TextType>(
longitudes: longitudes,
latitudes: latitudes,
mode: mode,
Name: Helpers.ToOption(Name),
ShowLegend: Helpers.ToOptionV(ShowLegend),
Opacity: Helpers.ToOptionV(Opacity),
MultiOpacity: Helpers.ToOption(MultiOpacity),
Text: Helpers.ToOption(Text),
MultiText: Helpers.ToOption(MultiText),
TextPosition: Helpers.ToOption(TextPosition),
MultiTextPosition: Helpers.ToOption(MultiTextPosition),
MarkerColor: Helpers.ToOption(MarkerColor),
MarkerColorScale: Helpers.ToOption(MarkerColorScale),
MarkerOutline: Helpers.ToOption(MarkerOutline),
MarkerSymbol: Helpers.ToOption(MarkerSymbol),
MultiMarkerSymbol: Helpers.ToOption(MultiMarkerSymbol),
Marker: Helpers.ToOption(Marker),
LineColor: Helpers.ToOption(LineColor),
LineColorScale: Helpers.ToOption(LineColorScale),
LineWidth: Helpers.ToOptionV(LineWidth),
LineDash: Helpers.ToOption(LineDash),
Line: Helpers.ToOption(Line),
LocationMode: Helpers.ToOption(LocationMode),
GeoJson: Helpers.ToOption(GeoJson),
FeatureIdKey: Helpers.ToOption(FeatureIdKey),
UseDefaults: Helpers.ToOptionV(UseDefaults)
);
}
}