@@ -62,7 +62,7 @@ const tooltipStyles = {
62
62
const BarGraph = props => {
63
63
const [ { tabs, currentTab } , dispatch ] = useStoreContext ( ) ;
64
64
const { width, height, data, comparison } = props ;
65
- const [ seriesNameInput , setSeriesNameInput ] = useState ( `Series ${ comparison . length } ` ) ;
65
+ const [ seriesNameInput , setSeriesNameInput ] = useState ( `Series ${ comparison . length } ` ) ;
66
66
const {
67
67
tooltipOpen,
68
68
tooltipLeft,
@@ -123,11 +123,11 @@ const BarGraph = props => {
123
123
}
124
124
}
125
125
} ) ;
126
-
126
+
127
127
const saveSeriesClickHandler = ( ) => {
128
128
if ( tabs [ currentTab ] . seriesSavedStatus === 'inputBoxOpen' ) {
129
129
const actionNames = document . getElementsByClassName ( 'actionname' ) ;
130
- for ( let i = 0 ; i < actionNames . length ; i ++ ) {
130
+ for ( let i = 0 ; i < actionNames . length ; i ++ ) {
131
131
toStorage . data . barStack [ i ] . name = actionNames [ i ] . value ;
132
132
}
133
133
dispatch ( save ( toStorage , seriesNameInput ) ) ;
@@ -137,18 +137,21 @@ const BarGraph = props => {
137
137
dispatch ( save ( toStorage ) )
138
138
}
139
139
140
- const textbox = tabs [ currentTab ] . seriesSavedStatus === 'inputBoxOpen' ? < input type = "text" id = "seriesname" value = { seriesNameInput } onChange = { e => setSeriesNameInput ( e . target . value ) } /> : null ;
140
+ const textbox = tabs [ currentTab ] . seriesSavedStatus === 'inputBoxOpen' ? < input type = "text" id = "seriesname" placeholder = "Enter Series Name" onChange = { e => setSeriesNameInput ( e . target . value ) } /> : null ;
141
141
return (
142
142
< div className = "bargraph-position" >
143
+
143
144
{ /* <input type="text" id ="seriesname" placeholder="Series Name" /> */ }
144
- { textbox }
145
- < button
146
- type = "button"
147
- className = "save-series-button"
148
- onClick = { saveSeriesClickHandler }
149
- >
150
- Save Series
151
- </ button >
145
+ < div >
146
+ { textbox }
147
+ < button
148
+ type = "button"
149
+ className = "save-series-button"
150
+ onClick = { saveSeriesClickHandler }
151
+ >
152
+ Save Series
153
+ </ button >
154
+ </ div >
152
155
< svg ref = { containerRef } width = { width } height = { height } >
153
156
< rect
154
157
x = { 0 }
@@ -191,8 +194,8 @@ const BarGraph = props => {
191
194
height = { bar . height === 0 ? null : bar . height }
192
195
width = { bar . width }
193
196
fill = { bar . color }
194
- /* TIP TOOL EVENT HANDLERS */
195
- // Hides tool tip once cursor moves off the current rect.
197
+ /* TIP TOOL EVENT HANDLERS */
198
+ // Hides tool tip once cursor moves off the current rect.
196
199
onMouseLeave = { ( ) => {
197
200
dispatch (
198
201
onHoverExit ( data . componentData [ bar . key ] . rtid ) ,
@@ -201,7 +204,7 @@ const BarGraph = props => {
201
204
} , 300 ) ) ,
202
205
) ;
203
206
} }
204
- // Cursor position in window updates position of the tool tip.
207
+ // Cursor position in window updates position of the tool tip.
205
208
onMouseMove = { event => {
206
209
dispatch ( onHover ( data . componentData [ bar . key ] . rtid ) ) ;
207
210
if ( tooltipTimeout ) clearTimeout ( tooltipTimeout ) ;
0 commit comments