Loading...
Loading...
Compare original and translation side by side
<Window xmlns:syncfusion="clr-namespace:Syncfusion.UI.Xaml.SmithChart;assembly=Syncfusion.SfSmithChart.WPF">
<Grid>
<syncfusion:SfSmithChart Header="Impedance Transmission" Height="400" Width="500">
<!-- LineSeries with data binding -->
<syncfusion:LineSeries ResistancePath="Resistance"
ReactancePath="Reactance"
ItemsSource="{Binding Data}"
Label="TransmissionLine"
ShowMarker="True">
</syncfusion:LineSeries>
<!-- Horizontal (Resistance) Axis -->
<syncfusion:SfSmithChart.HorizontalAxis>
<syncfusion:HorizontalAxis FontSize="11"/>
</syncfusion:SfSmithChart.HorizontalAxis>
<!-- Radial (Reactance) Axis -->
<syncfusion:SfSmithChart.RadialAxis>
<syncfusion:RadialAxis FontSize="11"/>
</syncfusion:SfSmithChart.RadialAxis>
<!-- Legend -->
<syncfusion:SfSmithChart.Legend>
<syncfusion:SmithChartLegend/>
</syncfusion:SfSmithChart.Legend>
</syncfusion:SfSmithChart>
</Grid>
</Window><Window xmlns:syncfusion="clr-namespace:Syncfusion.UI.Xaml.SmithChart;assembly=Syncfusion.SfSmithChart.WPF">
<Grid>
<syncfusion:SfSmithChart Header="Impedance Transmission" Height="400" Width="500">
<!-- LineSeries with data binding -->
<syncfusion:LineSeries ResistancePath="Resistance"
ReactancePath="Reactance"
ItemsSource="{Binding Data}"
Label="TransmissionLine"
ShowMarker="True">
</syncfusion:LineSeries>
<!-- Horizontal (Resistance) Axis -->
<syncfusion:SfSmithChart.HorizontalAxis>
<syncfusion:HorizontalAxis FontSize="11"/>
</syncfusion:SfSmithChart.HorizontalAxis>
<!-- Radial (Reactance) Axis -->
<syncfusion:SfSmithChart.RadialAxis>
<syncfusion:RadialAxis FontSize="11"/>
</syncfusion:SfSmithChart.RadialAxis>
<!-- Legend -->
<syncfusion:SfSmithChart.Legend>
<syncfusion:SmithChartLegend/>
</syncfusion:SfSmithChart.Legend>
</syncfusion:SfSmithChart>
</Grid>
</Window>using Syncfusion.UI.Xaml.SmithChart;
// Create SmithChart
SfSmithChart chart = new SfSmithChart();
chart.Header = "Impedance Transmission";
// Configure axes
chart.HorizontalAxis = new HorizontalAxis { FontSize = 11 };
chart.RadialAxis = new RadialAxis { FontSize = 11 };
// Add series
LineSeries series = new LineSeries
{
ItemsSource = Data,
ResistancePath = "Resistance",
ReactancePath = "Reactance",
Label = "TransmissionLine",
ShowMarker = true
};
chart.Series.Add(series);
// Add legend
chart.Legend = new SmithChartLegend();
// Add to layout
this.Content = chart;using Syncfusion.UI.Xaml.SmithChart;
// Create SmithChart
SfSmithChart chart = new SfSmithChart();
chart.Header = "Impedance Transmission";
// Configure axes
chart.HorizontalAxis = new HorizontalAxis { FontSize = 11 };
chart.RadialAxis = new RadialAxis { FontSize = 11 };
// Add series
LineSeries series = new LineSeries
{
ItemsSource = Data,
ResistancePath = "Resistance",
ReactancePath = "Reactance",
Label = "TransmissionLine",
ShowMarker = true
};
chart.Series.Add(series);
// Add legend
chart.Legend = new SmithChartLegend();
// Add to layout
this.Content = chart;public class TransmissionData
{
public double Resistance { get; set; }
public double Reactance { get; set; }
}
// Sample data
ObservableCollection<TransmissionData> Data = new ObservableCollection<TransmissionData>
{
new TransmissionData { Resistance = 0, Reactance = 0.05 },
new TransmissionData { Resistance = 0.3, Reactance = 0.1 },
new TransmissionData { Resistance = 1.0, Reactance = 0.4 },
new TransmissionData { Resistance = 2.0, Reactance = 0.5 }
};public class TransmissionData
{
public double Resistance { get; set; }
public double Reactance { get; set; }
}
// Sample data
ObservableCollection<TransmissionData> Data = new ObservableCollection<TransmissionData>
{
new TransmissionData { Resistance = 0, Reactance = 0.05 },
new TransmissionData { Resistance = 0.3, Reactance = 0.1 },
new TransmissionData { Resistance = 1.0, Reactance = 0.4 },
new TransmissionData { Resistance = 2.0, Reactance = 0.5 }
};// Add multiple series for comparison
LineSeries series1 = new LineSeries
{
ItemsSource = Data1,
ResistancePath = "Resistance",
ReactancePath = "Reactance",
Label = "Transmission-1",
ShowMarker = true
};
LineSeries series2 = new LineSeries
{
ItemsSource = Data2,
ResistancePath = "Resistance",
ReactancePath = "Reactance",
Label = "Transmission-2",
ShowMarker = true,
Interior = new SolidColorBrush(Colors.Orange)
};
chart.Series.Add(series1);
chart.Series.Add(series2);// Add multiple series for comparison
LineSeries series1 = new LineSeries
{
ItemsSource = Data1,
ResistancePath = "Resistance",
ReactancePath = "Reactance",
Label = "Transmission-1",
ShowMarker = true
};
LineSeries series2 = new LineSeries
{
ItemsSource = Data2,
ResistancePath = "Resistance",
ReactancePath = "Reactance",
Label = "Transmission-2",
ShowMarker = true,
Interior = new SolidColorBrush(Colors.Orange)
};
chart.Series.Add(series1);
chart.Series.Add(series2);// Series with markers, labels, and tooltip
LineSeries series = new LineSeries
{
ShowMarker = true,
MarkerType = MarkerType.Circle,
MarkerHeight = 10,
MarkerWidth = 10,
ShowToolTip = true,
ToolTipDuration = TimeSpan.FromSeconds(3),
StrokeThickness = 2,
EnableAnimation = true,
AnimationDuration = TimeSpan.FromSeconds(1)
};
series.DataLabel.ShowLabel = true;// Series with markers, labels, and tooltip
LineSeries series = new LineSeries
{
ShowMarker = true,
MarkerType = MarkerType.Circle,
MarkerHeight = 10,
MarkerWidth = 10,
ShowToolTip = true,
ToolTipDuration = TimeSpan.FromSeconds(3),
StrokeThickness = 2,
EnableAnimation = true,
AnimationDuration = TimeSpan.FromSeconds(1)
};
series.DataLabel.ShowLabel = true;// Apply custom palette and styling
chart.ColorModel = new SmithChartColorModel
{
Palette = ColorPalette.BlueChrome
};
chart.Background = new SolidColorBrush(Colors.WhiteSmoke);
chart.ChartAreaBackground = new SolidColorBrush(Colors.White);
chart.ChartAreaBorderBrush = new SolidColorBrush(Colors.Gray);
chart.ChartAreaBorderThickness = new Thickness(1);
chart.Radius = 0.9; // 90% of plot area// Apply custom palette and styling
chart.ColorModel = new SmithChartColorModel
{
Palette = ColorPalette.BlueChrome
};
chart.Background = new SolidColorBrush(Colors.WhiteSmoke);
chart.ChartAreaBackground = new SolidColorBrush(Colors.White);
chart.ChartAreaBorderBrush = new SolidColorBrush(Colors.Gray);
chart.ChartAreaBorderThickness = new Thickness(1);
chart.Radius = 0.9; // 90% of plot area// Switch to Admittance mode for different visualization
chart.RenderingType = RenderingType.Admittance;
// Data is now rendered from left to right// Switch to Admittance mode for different visualization
chart.RenderingType = RenderingType.Admittance;
// Data is now rendered from left to right| Property | Type | Description |
|---|---|---|
| object | Chart title/header text |
| HorizontalAxis | Resistance axis configuration |
| RadialAxis | Reactance axis configuration |
| ObservableCollection | Collection of chart series |
| SmithChartLegend | Legend configuration |
| RenderingType | Impedance or Admittance mode |
| double | Chart circle radius (0.1 to 1) |
| SmithChartColorModel | Palette and color settings |
| Brush | Chart plotting area background |
| 属性 | 类型 | 描述 |
|---|---|---|
| object | 图表标题/页眉文本 |
| HorizontalAxis | 电阻轴配置 |
| RadialAxis | 电抗轴配置 |
| ObservableCollection | 图表系列集合 |
| SmithChartLegend | 图例配置 |
| RenderingType | 阻抗或导纳模式 |
| double | 图表圆形半径(0.1至1) |
| SmithChartColorModel | 调色板和颜色设置 |
| Brush | 图表绘图区域背景 |
| Property | Type | Description |
|---|---|---|
| IEnumerable | Data source for the series |
| string | Property path for resistance values |
| string | Property path for reactance values |
| string | Series name (shows in legend) |
| Brush | Line color |
| double | Line thickness |
| bool | Display markers at data points |
| MarkerType | Marker shape (Circle, Rectangle, etc.) |
| bool | Enable tooltips on hover |
| bool | Animate series on load |
| bool | Show/hide series |
| 属性 | 类型 | 描述 |
|---|---|---|
| IEnumerable | 系列的数据源 |
| string | 电阻值的属性路径 |
| string | 电抗值的属性路径 |
| string | 系列名称(显示在图例中) |
| Brush | 线条颜色 |
| double | 线条粗细 |
| bool | 在数据点显示标记 |
| MarkerType | 标记形状(圆形、矩形等) |
| bool | 悬停时启用工具提示 |
| bool | 加载时启用系列动画 |
| bool | 显示/隐藏系列 |
| Property | Type | Description |
|---|---|---|
| bool | Display major gridlines |
| bool | Display minor gridlines |
| int | Number of minor gridlines (default: 8) |
| Style | Style for major gridlines |
| Style | Style for minor gridlines |
| bool | Display axis line |
| Style | Style for axis line |
| LabelPlacement | Inside or Outside positioning |
| LabelIntersectActions | Handle overlapping labels (Hide/None) |
| 属性 | 类型 | 描述 |
|---|---|---|
| bool | 显示主要网格线 |
| bool | 显示次要网格线 |
| int | 次要网格线数量(默认:8) |
| Style | 主要网格线样式 |
| Style | 次要网格线样式 |
| bool | 显示轴线 |
| Style | 轴线样式 |
| LabelPlacement | 内部或外部定位 |
| LabelIntersectActions | 处理重叠标签(隐藏/不处理) |