@@ -87,6 +87,7 @@ export default class DataFormatter {
87
87
return loc . key . toUpperCase ( ) === serie . alias . toUpperCase ( ) ;
88
88
} ) ;
89
89
90
+ // Todo: Propagate user-level notification?
90
91
if ( ! location ) {
91
92
return ;
92
93
}
@@ -201,6 +202,15 @@ export default class DataFormatter {
201
202
const link = this . settings . esLink ? row [ columnNames [ this . settings . esLink ] ] : null ;
202
203
203
204
const dataValue = this . createDataValue ( encodedGeohash , decodedGeohash , locationName , value , link ) ;
205
+
206
+ // Add all values from the original datapoint as attributes prefixed with `__field_`.
207
+ for ( let columnName in columnNames ) {
208
+ const value = row [ columnNames [ columnName ] ] ;
209
+ const key = '__field_' + columnName ;
210
+ dataValue [ key ] = value ;
211
+ }
212
+
213
+ // Bookkeeping for computing valueRange.
204
214
if ( dataValue . value > highestValue ) {
205
215
highestValue = dataValue . value ;
206
216
}
@@ -232,6 +242,15 @@ export default class DataFormatter {
232
242
const link = this . settings . esLink ? datapoint [ this . settings . esLink ] : null ;
233
243
234
244
const dataValue = this . createDataValue ( encodedGeohash , decodedGeohash , locationName , value , link ) ;
245
+
246
+ // Add all values from the original datapoint as attributes prefixed with `__field_`.
247
+ for ( let key in datapoint ) {
248
+ const value = datapoint [ key ] ;
249
+ key = '__field_' + key ;
250
+ dataValue [ key ] = value ;
251
+ }
252
+
253
+ // Bookkeeping for computing valueRange.
235
254
if ( dataValue . value > highestValue ) {
236
255
highestValue = dataValue . value ;
237
256
}
0 commit comments