Fix output

This commit is contained in:
Alexander Nozik 2018-07-11 21:07:15 +03:00
commit 1d2464df82
2 changed files with 4 additions and 3 deletions

View File

@ -47,7 +47,7 @@ class AmplitudeView : View(title = "Numass amplitude spectrum plot", icon = Imag
"showLine" to true "showLine" to true
"showSymbol" to false "showSymbol" to false
"showErrors" to false "showErrors" to false
}.setType(DataPlot::class) }.setType<DataPlot>()
} }
val binningProperty = SimpleObjectProperty(20) val binningProperty = SimpleObjectProperty(20)

View File

@ -34,7 +34,7 @@ class HVView : View(title = "High voltage time plot", icon = ImageView(dfIcon))
"showSymbol" to false "showSymbol" to false
"showErrors" to false "showErrors" to false
} }
plots.setType(DataPlot::class) plots.setType<DataPlot>()
} }
private val container = PlotContainer(frame); private val container = PlotContainer(frame);
@ -58,7 +58,8 @@ class HVView : View(title = "High voltage time plot", icon = ImageView(dfIcon))
} ui { hvData -> } ui { hvData ->
hvData?.let { hvData?.let {
for (dp in it) { for (dp in it) {
val plot: TimePlot = frame[change.key] as TimePlot? ?: TimePlot(change.key).apply { frame.add(this) } val plot: TimePlot = frame[change.key] as TimePlot?
?: TimePlot(change.key).apply { frame.add(this) }
plot.put(dp.getValue("timestamp").time, dp.getValue("value")) plot.put(dp.getValue("timestamp").time, dp.getValue("value"))
} }
} }