Skip to content

Commit 181f4b5

Browse files
author
Balamurugan P
committed
config(EJ2-28249): maps sample added
1 parent 0e59984 commit 181f4b5

24 files changed

+1898
-2340
lines changed

ej2-blazor-samples/Pages/Charts/SmithChart/Customization.razor

Lines changed: 66 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -35,85 +35,74 @@
3535

3636
<div class="control-section">
3737
<div>
38-
<EjsSmithchart ID="smithchart" Series="@series" HorizontalAxis="@horizontalAxis" RadialAxis="radialAxis" LegendSettings="@legendSettings" Title="@title"></EjsSmithchart>
38+
<EjsSmithchart ID="smithchart">
39+
<SmithchartTitle Visible='true'
40+
Text="Impedance Transmission" EnableTrim='true'
41+
MaximumWidth='200'>
42+
</SmithchartTitle>
43+
<SmithchartLegendSettings Visible='true'
44+
Shape="Circle" Position='Top'>
45+
</SmithchartLegendSettings>
46+
<SmithchartSeriesCollection>
47+
<SmithchartSeries Name="Transmission1" Points='@datasource1'
48+
EnableAnimation='true' enableSmartLabels = 'false'
49+
Fill="#0F94C4" Width='2'>
50+
<SmithchartSeriesTooltip Visible='true' ></SmithchartSeriesTooltip>
51+
<SmithchartSeriesMarker Visible='true' Shape='Rectangle'>
52+
<SmithchartSeriesMarkerDataLabel Visible='true'></SmithchartSeriesMarkerDataLabel>
53+
<SmithchartSeriesMarkerBorder Width='2'>
54+
</SmithchartSeriesMarkerBorder>
55+
</SmithchartSeriesMarker>
56+
</SmithchartSeries>
57+
<SmithchartSeries Name="Transmission2" Points='@datasource2'
58+
EnableAnimation='true' EnableSmartLabels='false' Fill="#EE0C88" Width='2'>
59+
<SmithchartSeriesTooltip Visible='true' ></SmithchartSeriesTooltip>
60+
<SmithchartSeriesMarker Visible='true' Shape='Circle'>
61+
<SmithchartSeriesMarkerDataLabel Visible='true'></SmithchartSeriesMarkerDataLabel>
62+
<SmithchartSeriesMarkerBorder Width='2'>
63+
</SmithchartSeriesMarkerBorder>
64+
</SmithchartSeriesMarker>
65+
</SmithchartSeries>
66+
</SmithchartSeriesCollection>
67+
</EjsSmithchart>
3968
</div>
4069
</div>
4170

4271
@code {
43-
44-
public object horizontalAxis { get; set; } = new
45-
{
46-
minorGridLines = new { visible = true }
47-
};
48-
public object radialAxis { get; set; } = new
49-
{
50-
minorGridLines = new { visible = true }
51-
};
52-
public object legendSettings { get; set; } = new
53-
{
54-
visible = true,
55-
shape = "Circle",
56-
position = "Top"
57-
};
58-
public object title { get; set; } = new
59-
{
60-
text = "Impedance Transmission",
61-
enableTrim = true,
62-
maximumWidth = 200,
63-
visible = true,
64-
font = new { size= "16px" }
65-
};
66-
public List<SmithchartSeries> series { get; set; } = new List<SmithchartSeries>() {
67-
new SmithchartSeries() {
68-
EnableAnimation = true,
69-
Name= "Transmission1",
70-
EnableSmartLabels = false,
71-
Fill= "#0F94C4",
72-
Width = 2,
73-
Tooltip= new{ visible= true },
74-
Marker= new {shape= "rectangle",border= new { width= 2 }, visible= true, dataLabel = new { visible = true } },
75-
Points = new List<object>{
76-
new { resistance= 10, reactance= 25 },
77-
new { resistance= 8, reactance= 6 },
78-
new { resistance= 6, reactance= 4.5 },
79-
new { resistance= 4.5, reactance= 4 },
80-
new { resistance= 3.5, reactance= 3 },
81-
new { resistance= 2.5, reactance= 2 },
82-
new { resistance= 2, reactance= 1.5 },
83-
new { resistance= 1.5, reactance= 1.25 },
84-
new { resistance= 1, reactance= 0.9 },
85-
new { resistance= 0.5, reactance= 0.6 },
86-
new { resistance= 0.3, reactance= 0.4 },
87-
new { resistance= 0.001, reactance= 0.15 },
88-
}
89-
},
90-
new SmithchartSeries() {
91-
EnableAnimation = true,
92-
Name= "Transmission2",
93-
EnableSmartLabels = false,
94-
Fill= "#EE0C88",
95-
Width = 2,
96-
Tooltip= new{ visible= true },
97-
Marker= new {shape= "rectangle",border= new { width= 2 }, visible= true, dataLabel = new { visible = true } },
98-
Points = new List<object>{
99-
new { resistance= 20, reactance= -50 },
100-
new { resistance= 10, reactance= -10 },
101-
new { resistance= 9, reactance= -4.5 },
102-
new { resistance= 8, reactance= -3.5 },
103-
new { resistance= 7, reactance= -2.5 },
104-
new { resistance= 6, reactance= -1.5 },
105-
new { resistance= 5, reactance= -1 },
106-
new { resistance= 4.5, reactance= -0.8 },
107-
new { resistance= 3.5, reactance= -0.8 },
108-
new { resistance= 2.5, reactance= -0.4 },
109-
new { resistance= 2, reactance= -0.2 },
110-
new { resistance= 1.5, reactance= 0.001 },
111-
new { resistance= 1, reactance= 0.1 },
112-
new { resistance= 0.5, reactance= 0.2 },
113-
new { resistance= 0.3, reactance= 0.15 },
114-
new { resistance= 0.001, reactance= 0.05 },
115-
}
116-
},
117-
};
118-
72+
public class SmithDataSource {
73+
public double resistance;
74+
public double reactance;
75+
};
76+
public List<SmithDataSource> datasource1 = new List<SmithDataSource> {
77+
new SmithDataSource { resistance= 10, reactance= 25 },
78+
new SmithDataSource { resistance= 8, reactance= 6 },
79+
new SmithDataSource { resistance= 6, reactance= 4.5 },
80+
new SmithDataSource { resistance= 4.5, reactance= 4 },
81+
new SmithDataSource { resistance= 3.5, reactance= 3 },
82+
new SmithDataSource { resistance= 2.5, reactance= 2 },
83+
new SmithDataSource { resistance= 2, reactance= 1.5 },
84+
new SmithDataSource { resistance= 1.5, reactance= 1.25 },
85+
new SmithDataSource { resistance= 1, reactance= 0.9 },
86+
new SmithDataSource { resistance= 0.5, reactance= 0.6 },
87+
new SmithDataSource { resistance= 0.3, reactance= 0.4 },
88+
new SmithDataSource { resistance= 0.001, reactance= 0.15 }
89+
};
90+
public List<SmithDataSource> datasource2 = new List<SmithDataSource> {
91+
new SmithDataSource { resistance= 20, reactance= -50 },
92+
new SmithDataSource { resistance= 10, reactance= -10 },
93+
new SmithDataSource { resistance= 9, reactance= -4.5 },
94+
new SmithDataSource { resistance= 8, reactance= -3.5 },
95+
new SmithDataSource { resistance= 7, reactance= -2.5 },
96+
new SmithDataSource { resistance= 6, reactance= -1.5 },
97+
new SmithDataSource { resistance= 5, reactance= -1 },
98+
new SmithDataSource { resistance= 4.5, reactance= -0.8 },
99+
new SmithDataSource { resistance= 3.5, reactance= -0.8 },
100+
new SmithDataSource { resistance= 2.5, reactance= -0.4 },
101+
new SmithDataSource { resistance= 2, reactance= -0.2 },
102+
new SmithDataSource { resistance= 1.5, reactance= 0.001 },
103+
new SmithDataSource { resistance= 1, reactance= 0.1 },
104+
new SmithDataSource { resistance= 0.5, reactance= 0.2 },
105+
new SmithDataSource { resistance= 0.3, reactance= 0.15 },
106+
new SmithDataSource { resistance= 0.001, reactance= 0.05 },
107+
};
119108
}

ej2-blazor-samples/Pages/Charts/SmithChart/DefaultFunctionalities.razor

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,32 @@
3636
@*End:Hidden*@
3737

3838
<div class="control-section">
39-
<EjsSmithchart ID="smithchart" Title="@title" Series="@points" LegendSettings="@legendSettings"></EjsSmithchart>
39+
<EjsSmithchart ID="smithchart">
40+
<SmithchartTitle Visible='true'
41+
Text="Transmission details">
42+
</SmithchartTitle>
43+
<SmithchartLegendSettings Visible='true'
44+
Shape="Circle">
45+
</SmithchartLegendSettings>
46+
<SmithchartSeriesCollection>
47+
<SmithchartSeries Name="Transmission1" Points='@datasource1'
48+
EnableAnimation='true'>
49+
<SmithchartSeriesTooltip Visible='true' ></SmithchartSeriesTooltip>
50+
<SmithchartSeriesMarker Visible='true' Shape='Circle'>
51+
<SmithchartSeriesMarkerBorder Width='2'>
52+
</SmithchartSeriesMarkerBorder>
53+
</SmithchartSeriesMarker>
54+
</SmithchartSeries>
55+
<SmithchartSeries Name="Transmission2" Points='@datasource2'
56+
EnableAnimation='true'>
57+
<SmithchartSeriesTooltip Visible='true' ></SmithchartSeriesTooltip>
58+
<SmithchartSeriesMarker Visible='true' Shape='Circle'>
59+
<SmithchartSeriesMarkerBorder Width='2'>
60+
</SmithchartSeriesMarkerBorder>
61+
</SmithchartSeriesMarker>
62+
</SmithchartSeries>
63+
</SmithchartSeriesCollection>
64+
</EjsSmithchart>
4065
</div>
4166
<style>
4267
@@ -63,45 +88,25 @@
6388

6489

6590
@code {
66-
// public Enum RenderType { get; set; } =
67-
public object title { get; set; } = new
68-
{
69-
visible = true,
70-
text = "Transmission details"
71-
};
72-
public object legendSettings { get; set; } = new
73-
{
74-
visible = true,
75-
shape = "Circle"
91+
public class SmithDataSource {
92+
public double resistance;
93+
public double reactance;
94+
};
95+
public List<SmithDataSource> datasource1 = new List<SmithDataSource> {
96+
new SmithDataSource { resistance= 10, reactance= 25 }, new SmithDataSource { resistance= 8, reactance= 6 },
97+
new SmithDataSource { resistance= 6, reactance= 4.5 }, new SmithDataSource { resistance= 4.5, reactance= 2 },
98+
new SmithDataSource { resistance= 3.5, reactance= 1.6 }, new SmithDataSource { resistance= 2.5, reactance= 1.3 },
99+
new SmithDataSource { resistance= 2, reactance= 1.2 }, new SmithDataSource { resistance= 1.5, reactance= 1 },
100+
new SmithDataSource { resistance= 1, reactance= 0.8 }, new SmithDataSource { resistance= 0.5, reactance= 0.4 },
101+
new SmithDataSource { resistance= 0.3, reactance= 0.2 }, new SmithDataSource { resistance= 0.001, reactance= 0.15 },
76102
};
77-
78-
public List<SmithchartSeries> points { get; set; } = new List<SmithchartSeries>() {
79-
new SmithchartSeries() { Name= "Transmission1",
80-
EnableAnimation = true,
81-
Tooltip= new{ visible= true },
82-
Marker= new {shape= "Circle",border= new { width= 2 }, visible= true },
83-
Points = new List<object>{
84-
new { resistance= 10, reactance= 25 }, new { resistance= 8, reactance= 6 },
85-
new { resistance= 6, reactance= 4.5 }, new { resistance= 4.5, reactance= 2 },
86-
new { resistance= 3.5, reactance= 1.6 }, new { resistance= 2.5, reactance= 1.3 },
87-
new { resistance= 2, reactance= 1.2 }, new { resistance= 1.5, reactance= 1 },
88-
new { resistance= 1, reactance= 0.8 }, new { resistance= 0.5, reactance= 0.4 },
89-
new { resistance= 0.3, reactance= 0.2 }, new { resistance= 0.001, reactance= 0.15 },
90-
}
91-
},
92-
new SmithchartSeries() { Name= "Transmission2",
93-
EnableAnimation = true,
94-
Tooltip= new{ visible= true },
95-
Marker= new {shape= "Circle",border= new { width= 2 }, visible= true },
96-
Points = new List<object>{
97-
new { resistance= 20, reactance= -50 }, new { resistance= 10, reactance= -10 },
98-
new { resistance= 9, reactance= -4.5 }, new { resistance= 8, reactance= -3.5 },
99-
new { resistance= 7, reactance= -2.5 }, new { resistance= 6, reactance= -1.5 },
100-
new { resistance= 5, reactance= -1 }, new { resistance= 4.5, reactance= -0.5 },
101-
new { resistance= 2, reactance= 0.5 }, new { resistance= 1.5, reactance= 0.4 },
102-
new { resistance= 1, reactance= 0.4 }, new { resistance= 0.5, reactance= 0.2 },
103-
new { resistance= 0.3, reactance= 0.1 }, new { resistance= 0.001, reactance= 0.05 },
104-
}
105-
}
103+
public List<SmithDataSource> datasource2 = new List<SmithDataSource> {
104+
new SmithDataSource { resistance= 20, reactance= -50 }, new SmithDataSource { resistance= 10, reactance= -10 },
105+
new SmithDataSource { resistance= 9, reactance= -4.5 }, new SmithDataSource { resistance= 8, reactance= -3.5 },
106+
new SmithDataSource { resistance= 7, reactance= -2.5 }, new SmithDataSource{ resistance= 6, reactance= -1.5 },
107+
new SmithDataSource { resistance= 5, reactance= -1 }, new SmithDataSource { resistance= 4.5, reactance= -0.5 },
108+
new SmithDataSource { resistance= 2, reactance= 0.5 }, new SmithDataSource { resistance= 1.5, reactance= 0.4 },
109+
new SmithDataSource { resistance= 1, reactance= 0.4 }, new SmithDataSource { resistance= 0.5, reactance= 0.2 },
110+
new SmithDataSource { resistance= 0.3, reactance= 0.1 }, new SmithDataSource { resistance= 0.001, reactance= 0.05 },
106111
};
107112
}

0 commit comments

Comments
 (0)