Skip to content

Commit f1d0dc8

Browse files
author
Jeffrey Na
committed
more comments in HealthChart.tsx
1 parent d43f242 commit f1d0dc8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/charts/HealthChart.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type PlotlyData = {
2828
/**
2929
* @params {HealthChartProps} props - the props object containing necessary data.
3030
* @desc Memoized component to generate a health chart with formatted data.
31-
* @returns JSX element with the health chart.
31+
* @returns {JSX.Element} The JSX element with the health chart.
3232
*/
3333
const HealthChart: React.FC<HealthChartProps> = React.memo(props => {
3434
const { dataType, serviceName, chartData, categoryName, sizing, colourGenerator } = props;
@@ -94,6 +94,10 @@ const HealthChart: React.FC<HealthChartProps> = React.memo(props => {
9494
}
9595
}, 20);
9696

97+
/**
98+
* @desc Takes the chart data and configures Plotly object to render associated health chart.
99+
* @returns {JSX.Element} Configured Plotly object representing health chart.
100+
*/
97101
const createChart = () => {
98102
const dataArray = generatePlotlyDataObjects(chartData);
99103
const sizeSwitch = sizing === 'all' ? all : solo;

0 commit comments

Comments
 (0)