|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Linq; |
| 4 | +using System.Text; |
| 5 | +using System.Threading.Tasks; |
| 6 | +using Plotly.NET; |
| 7 | +using Plotly.NET.LayoutObjects; |
| 8 | +using Plotly.NET.TraceObjects; |
| 9 | + |
| 10 | +namespace Plotly.NET.CSharp |
| 11 | +{ |
| 12 | + public static partial class ChartMap |
| 13 | + { |
| 14 | + /// <summary> |
| 15 | + /// Creates a ScatterGeo chart, where data is visualized using plotly's base geo map. |
| 16 | + /// |
| 17 | + /// In general, ScatterGeo Plots plot two-dimensional data on a geo map via (lat,lon) coordinates. |
| 18 | + /// |
| 19 | + /// 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 |
| 20 | + /// </summary> |
| 21 | + /// <param name="longitudes">Sets the longitude coordinates (in degrees East).</param> |
| 22 | + /// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param> |
| 23 | + /// <param name="mode">Determines the drawing mode for this scatter trace.</param> |
| 24 | + /// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param> |
| 25 | + /// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param> |
| 26 | + /// <param name="Opacity">Sets the opactity of the trace</param> |
| 27 | + /// <param name="MultiOpacity">Sets the opactity of individual datum markers</param> |
| 28 | + /// <param name="Text">Sets a text associated with each datum</param> |
| 29 | + /// <param name="MultiText">Sets individual text for each datum</param> |
| 30 | + /// <param name="TextPosition">Sets the position of text associated with each datum</param> |
| 31 | + /// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param> |
| 32 | + /// <param name="MarkerColor">Sets the color of the marker</param> |
| 33 | + /// <param name="MarkerColorScale">Sets the colorscale of the marker</param> |
| 34 | + /// <param name="MarkerOutline">Sets the outline of the marker</param> |
| 35 | + /// <param name="MarkerSymbol">Sets the marker symbol for each datum</param> |
| 36 | + /// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param> |
| 37 | + /// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param> |
| 38 | + /// <param name="LineColor">Sets the color of the line</param> |
| 39 | + /// <param name="LineColorScale">Sets the colorscale of the line</param> |
| 40 | + /// <param name="LineWidth">Sets the width of the line</param> |
| 41 | + /// <param name="LineDash">sets the drawing style of the line</param> |
| 42 | + /// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param> |
| 43 | + /// <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> |
| 44 | + /// <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> |
| 45 | + /// <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> |
| 46 | + /// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param> |
| 47 | + public static GenericChart.GenericChart ScatterGeo<LongitudesType, LatitudesType, TextType>( |
| 48 | + IEnumerable<LongitudesType> longitudes, |
| 49 | + IEnumerable<LatitudesType> latitudes, |
| 50 | + StyleParam.Mode mode, |
| 51 | + string? Name = null, |
| 52 | + bool? ShowLegend = null, |
| 53 | + double? Opacity = null, |
| 54 | + IEnumerable<double>? MultiOpacity = null, |
| 55 | + TextType? Text = null, |
| 56 | + IEnumerable<TextType>? MultiText = null, |
| 57 | + StyleParam.TextPosition? TextPosition = null, |
| 58 | + IEnumerable<StyleParam.TextPosition>? MultiTextPosition = null, |
| 59 | + Color? MarkerColor = null, |
| 60 | + StyleParam.Colorscale? MarkerColorScale = null, |
| 61 | + Line? MarkerOutline = null, |
| 62 | + StyleParam.MarkerSymbol? MarkerSymbol = null, |
| 63 | + IEnumerable<StyleParam.MarkerSymbol>? MultiMarkerSymbol = null, |
| 64 | + Marker? Marker = null, |
| 65 | + Color? LineColor = null, |
| 66 | + StyleParam.Colorscale? LineColorScale = null, |
| 67 | + double? LineWidth = null, |
| 68 | + StyleParam.DrawingStyle? LineDash = null, |
| 69 | + Line? Line = null, |
| 70 | + StyleParam.LocationFormat? LocationMode = null, |
| 71 | + Object? GeoJson = null, |
| 72 | + string? FeatureIdKey = null, |
| 73 | + bool? UseDefaults = null |
| 74 | + ) |
| 75 | + where LongitudesType : IConvertible |
| 76 | + where LatitudesType : IConvertible |
| 77 | + where TextType : class, IConvertible |
| 78 | + => |
| 79 | + Plotly.NET.ChartMap.Chart.ScatterGeo<LongitudesType, LatitudesType, TextType>( |
| 80 | + longitudes: longitudes, |
| 81 | + latitudes: latitudes, |
| 82 | + mode: mode, |
| 83 | + Name: Helpers.ToOption(Name), |
| 84 | + ShowLegend: Helpers.ToOptionV(ShowLegend), |
| 85 | + Opacity: Helpers.ToOptionV(Opacity), |
| 86 | + MultiOpacity: Helpers.ToOption(MultiOpacity), |
| 87 | + Text: Helpers.ToOption(Text), |
| 88 | + MultiText: Helpers.ToOption(MultiText), |
| 89 | + TextPosition: Helpers.ToOption(TextPosition), |
| 90 | + MultiTextPosition: Helpers.ToOption(MultiTextPosition), |
| 91 | + MarkerColor: Helpers.ToOption(MarkerColor), |
| 92 | + MarkerColorScale: Helpers.ToOption(MarkerColorScale), |
| 93 | + MarkerOutline: Helpers.ToOption(MarkerOutline), |
| 94 | + MarkerSymbol: Helpers.ToOption(MarkerSymbol), |
| 95 | + MultiMarkerSymbol: Helpers.ToOption(MultiMarkerSymbol), |
| 96 | + Marker: Helpers.ToOption(Marker), |
| 97 | + LineColor: Helpers.ToOption(LineColor), |
| 98 | + LineColorScale: Helpers.ToOption(LineColorScale), |
| 99 | + LineWidth: Helpers.ToOptionV(LineWidth), |
| 100 | + LineDash: Helpers.ToOption(LineDash), |
| 101 | + Line: Helpers.ToOption(Line), |
| 102 | + LocationMode: Helpers.ToOption(LocationMode), |
| 103 | + GeoJson: Helpers.ToOption(GeoJson), |
| 104 | + FeatureIdKey: Helpers.ToOption(FeatureIdKey), |
| 105 | + UseDefaults: Helpers.ToOptionV(UseDefaults) |
| 106 | + ); |
| 107 | + } |
| 108 | +} |
0 commit comments