aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/ChartBox.tsx
diff options
context:
space:
mode:
authorNaafiyan Ahmed <naafiyan@gmail.com>2022-07-13 20:11:27 -0400
committerNaafiyan Ahmed <naafiyan@gmail.com>2022-07-13 20:11:27 -0400
commitee2b15e0baa9cd3847d785c62d75fd82defaee08 (patch)
tree79f0fe6624a9837aef9f28cacf295e8bccef1c59 /src/client/views/nodes/DataVizBox/ChartBox.tsx
parent6a117b8779d1e3c00fbe67cb38c7cde1fe5b0552 (diff)
got selection and x, y pos to work
Diffstat (limited to 'src/client/views/nodes/DataVizBox/ChartBox.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/ChartBox.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/nodes/DataVizBox/ChartBox.tsx b/src/client/views/nodes/DataVizBox/ChartBox.tsx
index 36d23d30e..7424fbe5f 100644
--- a/src/client/views/nodes/DataVizBox/ChartBox.tsx
+++ b/src/client/views/nodes/DataVizBox/ChartBox.tsx
@@ -32,6 +32,7 @@ export interface ChartData {
xLabel: string;
yLabel: string;
data: DataPoints[];
+ tooltipContent: (data: DataPoints) => string;
}
@observer
@@ -64,6 +65,9 @@ export class ChartBox extends React.Component<ChartBoxProps> {
xLabel: '',
yLabel: '',
data: [],
+ tooltipContent: (data: DataPoints) => {
+ return `<b>x: ${data.x} y: ${data.y}</b>`;
+ },
};
if (this.props.pairs && this.props.pairs.length > 0) {