Skip to content

Commit 0efd164

Browse files
committed
formatting
1 parent f0ff1d7 commit 0efd164

File tree

1 file changed

+30
-17
lines changed

1 file changed

+30
-17
lines changed

src/pages/NwbPage/plugins/simple-timeseries/TimeseriesPlot.tsx

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ const TimeseriesPlot: FunctionComponent<Partial<Props>> = ({
8181

8282
const layout = useMemo(
8383
() => ({
84-
width: (width || 700),
84+
width: width || 700,
8585
height: height || 300,
86-
margin: {
87-
l: 50,
88-
r: 20,
89-
t: 20,
90-
b: 50,
91-
},
86+
margin: {
87+
l: 50,
88+
r: 20,
89+
t: 20,
90+
b: 50,
91+
},
9292
xaxis: {
9393
title: {
9494
text: "Time (s)",
@@ -116,7 +116,14 @@ const TimeseriesPlot: FunctionComponent<Partial<Props>> = ({
116116
},
117117
showlegend: showLegend,
118118
}),
119-
[channelSeparation, height, visibleEndTime, visibleStartTime, width, showLegend],
119+
[
120+
channelSeparation,
121+
height,
122+
visibleEndTime,
123+
visibleStartTime,
124+
width,
125+
showLegend,
126+
],
120127
);
121128

122129
const config = useMemo(
@@ -157,19 +164,25 @@ const TimeseriesPlot: FunctionComponent<Partial<Props>> = ({
157164

158165
return (
159166
<div>
160-
<div style={{ marginBottom: '10px', display: 'flex', justifyContent: 'flex-end' }}>
161-
<button
167+
<div
168+
style={{
169+
marginBottom: "10px",
170+
display: "flex",
171+
justifyContent: "flex-end",
172+
}}
173+
>
174+
<button
162175
onClick={() => setShowLegend(!showLegend)}
163176
style={{
164-
padding: '5px 10px',
165-
backgroundColor: '#f8f9fa',
166-
border: '1px solid #dee2e6',
167-
borderRadius: '4px',
168-
cursor: 'pointer',
169-
fontSize: '12px'
177+
padding: "5px 10px",
178+
backgroundColor: "#f8f9fa",
179+
border: "1px solid #dee2e6",
180+
borderRadius: "4px",
181+
cursor: "pointer",
182+
fontSize: "12px",
170183
}}
171184
>
172-
{showLegend ? 'Hide Legend' : 'Show Legend'}
185+
{showLegend ? "Hide Legend" : "Show Legend"}
173186
</button>
174187
</div>
175188
<Plot data={plotData} layout={layout} config={config} />

0 commit comments

Comments
 (0)