Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
151111 | Jan 31,2020 07:32 AM UTC | Apr 14,2020 02:39 PM UTC | React - EJ 2 | 21 |
![]() |
Tags: Smith Chart |
Change() {
let data = [
{ resistance: 20, reactance: -50 },
// Add more data
];
this.smithchartInstance.series[0].points = data;
this.smithchartInstance.refresh();
} |
class App extends Component<AppProps, AppState> {
private smithchartInstance: SmithchartComponent;
constructor(props) {
super(props);
this.state = {
name: "React"
};
}
Change() {
let data = [
{ resistance: 20, reactance: -50 },
// More data
];
this.smithchartInstance.series[0].points = data;
this.smithchartInstance.refresh();
}
render() {
return (
<div>
<button id="click" onClick={this.Change.bind(this)}>
Click to Change data
</button>
<SmithchartComponent
id="smith-chart"
ref={gauge => (this.smithchartInstance = gauge)}
>
// Add more codes
</SmithchartComponent>
</div>
);
}
} |
ref={gauge => (this.smithchartInstance = gauge as SmithchartComponent)}
|
<SmithchartSeriesCollectionDirective>
<SmithchartSeriesDirective
fill= 'transparent'
name="Transmission1"
marker={{
shape: "Circle",
visible: true,
fill: 'red',
border: { width: 2 }
}}
/>
</SmithchartSeriesCollectionDirective>
</SmithchartComponent> |
loaded(args) {
let element = document.getElementById('smith-chart_series0_points');
element.setAttribute('stroke', 'transparent');
}
|
<SmithchartComponent background="transparent"/>
</SmithchartComponent> |
<SmithchartComponent
horizontalAxis={{
majorGridLines:{color: ‘white’},
axisLine:{color: ‘white’},
labelStyle:{ color: ‘white’ }
}}
radialAxis={{
majorGridLines:{color: ‘white’},
axisLine:{color: ‘white’},
labelStyle:{ color: ‘white’ }
}} />
</SmithchartComponent> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.