Gallery
Map World Palette
<%@ Page Language="C#" Description="dotnetCHARTING Component" %>
<%@ Register TagPrefix="dotnet" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Drawing2D" %>
<%@ Import Namespace="dotnetCHARTING.Mapping" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>.netCHARTING Sample</title>
<script runat="server">
// Demonstrates using a palette for a layer and zooming.
void Page_Load(Object sender, EventArgs e)
{
Chart.Type = ChartType.Map;
Chart.Size = "650x540";
//Chart.Title = "Mapping Sample";
Chart.TempDirectory = "temp";
Chart.Debug = true;
Chart.TitleBox.Position = TitleBoxPosition.Full;
Chart.LegendBox.Visible = false;
Annotation an = new Annotation("Africa");
an.Label.Font = new Font("tahoma, geneva, sans-serif", 36, FontStyle.Bold); ;
an.Position = new Point(70, 380);
an.Background.Color = Color.Transparent;
an.Line.Color = Color.Transparent;
Chart.Annotations.Add(an);
MapLayer layer = MapDataEngine.LoadLayer("../../images/MapFiles/world.shp");
Chart.Mapping.DefaultShape.Line.Color = Color.Gray;
Chart.Mapping.ZoomCenterPoint = new PointF(3, 18);
Chart.Mapping.ZoomPercentage = 351;
layer.PaletteName = Palette.FiveColor1;
Chart.Mapping.MapLayerCollection.Add(layer);
}
</script>
</head>
<body>
<div style="text-align: center">
<dotnet:Chart ID="Chart" runat="server">
</dotnet:Chart>
</div>
</body>
</html>
<%@ Page Language="vb" Description="dotnetCHARTING Component" %>
<%@ Register TagPrefix="dotnet" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Drawing2D" %>
<%@ Import Namespace="dotnetCHARTING.Mapping" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>.netCHARTING Sample</title>
<script runat="server">
' Demonstrates using a palette for a layer and zooming.
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Chart.Type = ChartType.Map
Chart.Size = "650x540"
'Chart.Title = "Mapping Sample";
Chart.TempDirectory = "temp"
Chart.Debug = True
Chart.TitleBox.Position = TitleBoxPosition.Full
Chart.LegendBox.Visible = False
Dim an As Annotation = New Annotation("Africa")
an.Label.Font = New Font("tahoma, geneva, sans-serif", 36, FontStyle.Bold)
an.Position = New Point(70, 380)
an.Background.Color = Color.Transparent
an.Line.Color = Color.Transparent
Chart.Annotations.Add(an)
Dim layer As MapLayer = MapDataEngine.LoadLayer("../../images/MapFiles/world.shp")
Chart.Mapping.DefaultShape.Line.Color = Color.Gray
Chart.Mapping.ZoomCenterPoint = New PointF(3, 18)
Chart.Mapping.ZoomPercentage = 351
layer.PaletteName = Palette.FiveColor1
Chart.Mapping.MapLayerCollection.Add(layer)
End Sub
</script>
</head>
<body>
<div style="text-align: center">
<dotnet:Chart ID="Chart" runat="server">
</dotnet:Chart>
</div>
</body>
</html>
- Sample FilenameMapWorldPalette.aspx
- Version5.1
- Uses DatabaseNo