version1.0.0-rc.16 fixes
This commit is contained in:
@@ -37,33 +37,33 @@ type PlotlyPlot = {
|
||||
|
||||
type PlotlyData = PlotlyPlot[]
|
||||
|
||||
function AxisTypeX(plot: PlotType) : JSX.Element{
|
||||
function AxisTypeX(plot: PlotType) : string {
|
||||
if (plot == PlotType.AZIM_INT)
|
||||
return <>Q [Å<sup>-1</sup>]</>
|
||||
return "Q [Å<sup>-1</sup>]"
|
||||
else
|
||||
return <>Image number</>;
|
||||
return "Image number";
|
||||
}
|
||||
|
||||
function AxisTypeY(plot: PlotType) : JSX.Element {
|
||||
function AxisTypeY(plot: PlotType) : string {
|
||||
switch (plot) {
|
||||
case PlotType.COLLECTION_EFFICIENCY:
|
||||
return <>Efficiency</>;
|
||||
return "Efficiency";
|
||||
case PlotType.SPOT_COUNT:
|
||||
return <>Spot count</>;
|
||||
return "Spot count";
|
||||
case PlotType.ROI_MAX_COUNT:
|
||||
case PlotType.ROI_SUM:
|
||||
case PlotType.AZIM_INT:
|
||||
case PlotType.BKG_ESTIMATE:
|
||||
return <>Photon count</>;
|
||||
return "Photon count";
|
||||
case PlotType.INDEXING_RATE:
|
||||
return <>Indexing rate</>;
|
||||
return "Indexing rate";
|
||||
case PlotType.ERROR_PIXELS:
|
||||
case PlotType.STRONG_PIXELS:
|
||||
return <>Pixel count</>;
|
||||
return "Pixel count";
|
||||
case PlotType.RECEIVER_DELAY:
|
||||
return <>Delay</>;
|
||||
return "Delay";
|
||||
case PlotType.RECEIVER_FREE_SEND_BUFS:
|
||||
return <>Free buffers</>;
|
||||
return "Free buffers";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ class DataProcessingPlot extends Component<MyProps, MyState> {
|
||||
|
||||
componentDidMount() {
|
||||
this.getValues();
|
||||
this.interval = setInterval(() => this.getValues(), 500);
|
||||
this.interval = setInterval(() => this.getValues(), 1000);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
@@ -190,7 +190,6 @@ class DataProcessingPlot extends Component<MyProps, MyState> {
|
||||
mode: "line",
|
||||
name: d.title
|
||||
}));
|
||||
|
||||
return <MultiLinePlotWrapper xaxis={AxisTypeX(this.props.type)} yaxis={AxisTypeY(this.props.type)} data={data}/>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user