diff --git a/src/components/NetworkGraphChart/GraphContainer.js b/src/components/NetworkGraphChart/GraphContainer.js
index a264eece..287a5029 100644
--- a/src/components/NetworkGraphChart/GraphContainer.js
+++ b/src/components/NetworkGraphChart/GraphContainer.js
@@ -36,6 +36,22 @@ const CELL_WIDTH_SCALE = scaleLinear().domain([0, 1]).range(CELL_WIDTH_RANGE);
// camera.animatedUnzoom(renderer);
// }
+/**
+ * Network graph wrapper
+ * @todo this should be enterely refactored using https://github.com/sim51/react-sigma-v2
+ * @param {object} graph
+ * @param {string} nodeColor - field name
+ * @param {string} nodeSize - field name
+ * @param {number} labelDensity
+ * @param {string} nodeLabel - fieldName
+ * @param {function} onCameraUpdate
+ * @param {object} cameraPosition
+ * @param {number} updateTimestamp
+ * @param {number} width
+ * @param {number} height
+ * @param {number} ratio - camera ratio/zoom level
+ * @returns {React.ReactElement} - React component
+ */
function GraphContainer({
graph,
nodeColor: nodeColorVariable,
diff --git a/src/components/RadarPlot/RadarPlot.js b/src/components/RadarPlot/RadarPlot.js
index 414e5913..d5608726 100644
--- a/src/components/RadarPlot/RadarPlot.js
+++ b/src/components/RadarPlot/RadarPlot.js
@@ -8,6 +8,14 @@ import VisObject from './VisObject';
import './RadarPlot.scss';
+/**
+ * Displays a radar plot
+ * @todo this component should be genericized at some point, it was done in haste
+ * @param {array} data
+ * @param {number} size
+ * @param {array
} axis - list of columns names to use as axis
+ * @returns {React.ReactElement} - React component
+ */
const RadarPlot= ({
data,
size : wholeSize = 100,
diff --git a/src/components/RadarPlot/RadarPlot.scss b/src/components/RadarPlot/RadarPlot.scss
index 7ef12741..5987d249 100644
--- a/src/components/RadarPlot/RadarPlot.scss
+++ b/src/components/RadarPlot/RadarPlot.scss
@@ -1,7 +1,6 @@
@import "../../variables.scss";
-
- .RadarPlot {
+.RadarPlot {
.AxisObject {
font-size: 0.7rem;
.label {
@@ -31,4 +30,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/components/RadarPlot/VisObject.js b/src/components/RadarPlot/VisObject.js
index a9929e36..f7a9f55d 100644
--- a/src/components/RadarPlot/VisObject.js
+++ b/src/components/RadarPlot/VisObject.js
@@ -4,6 +4,14 @@ import { useSpring, animated } from 'react-spring'
import { fixSvgDimension, polarToCartesian } from '../../helpers/misc';
+/**
+ * A plain animated circle
+ * @param {number} cx
+ * @param {number} cy
+ * @param {number} r
+ * @param {object} props
+ * @returns {React.ReactElement} - React component
+ */
const Circle = ({
cx: inputX,
cy: inputY,
@@ -29,6 +37,18 @@ const Circle = ({
)
}
+
+/**
+ * Displays a radarplot object
+ * @param {string} color
+ * @param {object} data - single data object
+ * @param {object} axisIndexMap
+ * @param {function} axisRankScale
+ * @param {array} center - 2D coordinates of center in pixels
+ * @param {string} name
+ * @param {function} radiusScale
+ * @returns {React.ReactElement} - React component
+ */
const VisObject = ({
color,
data,
diff --git a/src/components/RadioButton/RadioButton.js b/src/components/RadioButton/RadioButton.js
index fedd3535..5eac027b 100644
--- a/src/components/RadioButton/RadioButton.js
+++ b/src/components/RadioButton/RadioButton.js
@@ -1,6 +1,23 @@
import React from "react";
-const RadioButton = ({ type, id, name, label, checked, onChange }) => {
+/**
+ * Displays a plain radio button
+ * @param {string} type
+ * @param {string} id
+ * @param {string} name
+ * @param {string} label
+ * @param {boolean} checked
+ * @param {function} onChange
+ * @returns {React.ReactElement} - React component
+ */
+const RadioButton = ({
+ type = 'radio',
+ id,
+ name,
+ label,
+ checked,
+ onChange
+}) => {
return (
<>
{
- const style = { width: 300, margin: 50 };
+/**
+ * Displays an interactive slider
+ * @param {string} title
+ * @param {number} min
+ * @param {number} max
+ * @param {number} value
+ * @param {function} onChange
+ * @returns {React.ReactElement} - React component
+ */
+const SliderRange = ({
+ title,
+ min,
+ max,
+ value,
+ onChange
+}) => {
+ const style = { width: 300, margin: 50 };
+
+ return (
+
+ )
+}
- return (
-
- )
- }
-
export default SliderRange;
\ No newline at end of file
diff --git a/src/components/SvgChart/SvgChart.js b/src/components/SvgChart/SvgChart.js
index b543d2f6..f639d2fa 100644
--- a/src/components/SvgChart/SvgChart.js
+++ b/src/components/SvgChart/SvgChart.js
@@ -1,5 +1,10 @@
+/**
+ * Displays an svg image
+ * @param {string} {path}
+ * @returns {React.ReactElement} - React component
+ */
function SvgChart ({path}) {
return
}
diff --git a/src/components/TreemapChart/TreemapChart.js b/src/components/TreemapChart/TreemapChart.js
index 74732588..412f1b68 100644
--- a/src/components/TreemapChart/TreemapChart.js
+++ b/src/components/TreemapChart/TreemapChart.js
@@ -26,34 +26,20 @@ const formatNestResults = (input) => {
} else return input;
}
+
+
/**
- * LineChart component - returns a