diff options
| author | srichman333 <sarah_n_richman@brown.edu> | 2024-02-01 00:15:05 -0500 |
|---|---|---|
| committer | srichman333 <sarah_n_richman@brown.edu> | 2024-02-01 00:15:05 -0500 |
| commit | a1939f7547413aa97c8d8967f57b4bb5aea0cdef (patch) | |
| tree | 485de1d3dd9bdd5e385f2e6521cadfc4223ee02c /src/client/views/nodes/DataVizBox/utils/D3Utils.ts | |
| parent | 4a0f77ae19934273a34e3a57541e7e8c4172b469 (diff) | |
2 lines on line chart have a legend
Diffstat (limited to 'src/client/views/nodes/DataVizBox/utils/D3Utils.ts')
| -rw-r--r-- | src/client/views/nodes/DataVizBox/utils/D3Utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/DataVizBox/utils/D3Utils.ts b/src/client/views/nodes/DataVizBox/utils/D3Utils.ts index 10bfb0c64..336935d23 100644 --- a/src/client/views/nodes/DataVizBox/utils/D3Utils.ts +++ b/src/client/views/nodes/DataVizBox/utils/D3Utils.ts @@ -61,6 +61,6 @@ export const yGrid = (g: d3.Selection<SVGGElement, unknown, null, undefined>, wi ); }; -export const drawLine = (p: d3.Selection<SVGPathElement, unknown, null, undefined>, dataPts: DataPoint[], lineGen: d3.Line<DataPoint>) => { - p.datum(dataPts).attr('fill', 'none').attr('stroke', 'rgba(53, 162, 235, 0.5)').attr('stroke-width', 2).attr('class', 'line').attr('d', lineGen); +export const drawLine = (p: d3.Selection<SVGPathElement, unknown, null, undefined>, dataPts: DataPoint[], lineGen: d3.Line<DataPoint>, extra: boolean) => { + p.datum(dataPts).attr('fill', 'none').attr('stroke', 'rgba(53, 162, 235, 0.5)').attr('stroke-width', 2).attr('stroke', extra? 'blue' : 'black').attr('class', 'line').attr('d', lineGen); }; |
