Add colors and move capability to charts

This commit is contained in:
Thomas Nordquist
2019-06-17 18:08:35 +02:00
parent 0f9c2cd36f
commit 8c1c6387c9
13 changed files with 301 additions and 20 deletions

View File

@@ -11,6 +11,7 @@ interface Props {
dotPath?: string
interpolation?: PlotCurveTypes
range?: [number?, number?]
color?: string
}
function nodeToHistory(history: q.MessageHistory) {
@@ -41,7 +42,7 @@ function nodeDotPathToHistory(history: q.MessageHistory, dotPath: string) {
function render(props: Props) {
const data = props.dotPath ? nodeDotPathToHistory(props.history, props.dotPath) : nodeToHistory(props.history)
return <PlotHistory range={props.range} interpolation={props.interpolation} data={data} />
return <PlotHistory color={props.color} range={props.range} interpolation={props.interpolation} data={data} />
}
export default render