@@ -77,9 +77,14 @@ const BarGraph = props => {
77
77
scroll : true ,
78
78
} ) ;
79
79
const keys = Object . keys ( data . componentData ) ;
80
+ console . log ( 'this is data in barGraph.tsx: ' , data ) ;
81
+ console . log ( 'these are the data\'s keys: ' , keys )
80
82
81
83
// data accessor (used to generate scales) and formatter (add units for on hover box)
82
- const getSnapshotId = ( d : snapshot ) => d . snapshotId ;
84
+ const getSnapshotId = ( d : snapshot ) => {
85
+ console . log ( 'snapshot object here: ' , d ) ;
86
+ return d . snapshotId ;
87
+ }
83
88
const formatSnapshotId = id => `Snapshot ID: ${ id } ` ;
84
89
const formatRenderTime = time => `${ time } ms ` ;
85
90
@@ -99,6 +104,8 @@ const BarGraph = props => {
99
104
range : schemeSet3 ,
100
105
} ) ;
101
106
107
+ console . log ( )
108
+
102
109
// setting max dimensions and scale ranges
103
110
const xMax = width - margin . left - margin . right ;
104
111
const yMax = height - margin . top - 150 ;
@@ -116,6 +123,7 @@ const BarGraph = props => {
116
123
for ( let i = 0 ; i < saveButtons . length ; i ++ ) {
117
124
if ( tabs [ currentTab ] . seriesSavedStatus === 'saved' ) {
118
125
saveButtons [ i ] . classList . add ( 'animate' ) ;
126
+ console . log ( 'checking saveButtons[i].classList' , saveButtons [ i ] . classList )
119
127
saveButtons [ i ] . innerHTML = 'Saved!' ;
120
128
} else {
121
129
saveButtons [ i ] . innerHTML = 'Save Series' ;
@@ -137,6 +145,7 @@ const BarGraph = props => {
137
145
dispatch ( save ( toStorage ) ) ;
138
146
} ;
139
147
148
+ // FTRI9 note - need to ensure text box is not empty before saving
140
149
const textbox = tabs [ currentTab ] . seriesSavedStatus === 'inputBoxOpen' ? < input type = "text" id = "seriesname" placeholder = "Enter Series Name" onChange = { e => setSeriesNameInput ( e . target . value ) } /> : null ;
141
150
return (
142
151
< div className = "bargraph-position" >
@@ -166,6 +175,23 @@ const BarGraph = props => {
166
175
) ) }
167
176
</ select >
168
177
</ form >
178
+ < form className = "routesForm" id = "routes-formcontrol" >
179
+ < label id = "routes-dropdown" > Select Snapshot: </ label >
180
+ < select
181
+ labelId = "demo-simple-select-label"
182
+ id = "routes-select"
183
+ onChange = { e => setSnapshot ( e . target . value ) }
184
+ >
185
+ < option >
186
+ All Snapshots
187
+ </ option >
188
+ { filteredSnapshots . map ( route => (
189
+ < option className = "routes" >
190
+ { route . snapshotId }
191
+ </ option >
192
+ ) ) }
193
+ </ select >
194
+ </ form >
169
195
</ div >
170
196
< svg ref = { containerRef } width = { width } height = { height } >
171
197
< rect
@@ -197,6 +223,9 @@ const BarGraph = props => {
197
223
color = { colorScale }
198
224
>
199
225
{ barStacks => barStacks . map ( barStack => barStack . bars . map ( ( bar , idx ) => {
226
+ console . log ( width , '<-- width' ) ;
227
+ console . log ( height , '<-- height' ) ;
228
+ console . log ( bar , '<-- bar' ) ;
200
229
// Hides new components if components don't exist in previous snapshots.
201
230
if ( Number . isNaN ( bar . bar [ 1 ] ) || bar . height < 0 ) {
202
231
bar . height = 0 ;
0 commit comments