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}
0 commit comments