@@ -62,7 +62,7 @@ const tooltipStyles = {
6262const BarGraph = props => {
6363 const [ { tabs, currentTab } , dispatch ] = useStoreContext ( ) ;
6464 const { width, height, data, comparison } = props ;
65- const [ seriesNameInput , setSeriesNameInput ] = useState ( `Series ${ comparison . length } ` ) ;
65+ const [ seriesNameInput , setSeriesNameInput ] = useState ( `Series ${ comparison . length } ` ) ;
6666 const {
6767 tooltipOpen,
6868 tooltipLeft,
@@ -123,11 +123,11 @@ const BarGraph = props => {
123123 }
124124 }
125125 } ) ;
126-
126+
127127 const saveSeriesClickHandler = ( ) => {
128128 if ( tabs [ currentTab ] . seriesSavedStatus === 'inputBoxOpen' ) {
129129 const actionNames = document . getElementsByClassName ( 'actionname' ) ;
130- for ( let i = 0 ; i < actionNames . length ; i ++ ) {
130+ for ( let i = 0 ; i < actionNames . length ; i ++ ) {
131131 toStorage . data . barStack [ i ] . name = actionNames [ i ] . value ;
132132 }
133133 dispatch ( save ( toStorage , seriesNameInput ) ) ;
@@ -137,18 +137,21 @@ const BarGraph = props => {
137137 dispatch ( save ( toStorage ) )
138138 }
139139
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 ;
141141 return (
142142 < div className = "bargraph-position" >
143+
143144 { /* <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 >
152155 < svg ref = { containerRef } width = { width } height = { height } >
153156 < rect
154157 x = { 0 }
@@ -191,8 +194,8 @@ const BarGraph = props => {
191194 height = { bar . height === 0 ? null : bar . height }
192195 width = { bar . width }
193196 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.
196199 onMouseLeave = { ( ) => {
197200 dispatch (
198201 onHoverExit ( data . componentData [ bar . key ] . rtid ) ,
@@ -201,7 +204,7 @@ const BarGraph = props => {
201204 } , 300 ) ) ,
202205 ) ;
203206 } }
204- // Cursor position in window updates position of the tool tip.
207+ // Cursor position in window updates position of the tool tip.
205208 onMouseMove = { event => {
206209 dispatch ( onHover ( data . componentData [ bar . key ] . rtid ) ) ;
207210 if ( tooltipTimeout ) clearTimeout ( tooltipTimeout ) ;
0 commit comments