|
39 | 39 | <tf-line-chart-data-loader
|
40 | 40 | x-type="[[xType]]"
|
41 | 41 | x-components-creation-method="[[_xComponentsCreationMethod]]"
|
42 |
| - y-value-accessor="[[_yValueAccessor]]" |
43 |
| - tooltip-columns="[[_tooltipColumns]]" |
44 | 42 | smoothing-enabled="[[smoothingEnabled]]"
|
45 | 43 | smoothing-weight="[[smoothingWeight]]"
|
46 | 44 | tooltip-sorting-method="[[tooltipSortingMethod]]"
|
|
234 | 232 | type: Object,
|
235 | 233 | computed: '_computeXComponentsCreationMethod(xType)',
|
236 | 234 | },
|
237 |
| - |
238 |
| - _yValueAccessor: { |
239 |
| - type: Object, |
240 |
| - readOnly: true, |
241 |
| - value: () => { |
242 |
| - return d => d.scalar; |
243 |
| - }, |
244 |
| - }, |
245 |
| - |
246 |
| - _tooltipColumns: { |
247 |
| - type: Array, |
248 |
| - readOnly: true, |
249 |
| - value: () => { |
250 |
| - const valueFormatter = ChartHelpers.multiscaleFormatter( |
251 |
| - ChartHelpers.Y_TOOLTIP_FORMATTER_PRECISION); |
252 |
| - const formatValueOrNaN = |
253 |
| - (x) => isNaN(x) ? 'NaN' : valueFormatter(x); |
254 |
| - return [ |
255 |
| - { |
256 |
| - title: 'Name', |
257 |
| - evaluate: (d) => d.dataset.metadata().name, |
258 |
| - }, |
259 |
| - { |
260 |
| - title: 'Smoothed', |
261 |
| - evaluate: (d, statusObject) => formatValueOrNaN( |
262 |
| - statusObject.smoothingEnabled ? |
263 |
| - d.datum.smoothed : d.datum.scalar), |
264 |
| - }, |
265 |
| - { |
266 |
| - title: 'Value', |
267 |
| - evaluate: (d) => formatValueOrNaN(d.datum.scalar), |
268 |
| - }, |
269 |
| - { |
270 |
| - title: 'Step', |
271 |
| - evaluate: (d) => ChartHelpers.stepFormatter(d.datum.step), |
272 |
| - }, |
273 |
| - { |
274 |
| - title: 'Time', |
275 |
| - evaluate: (d) => ChartHelpers.timeFormatter(d.datum.wall_time), |
276 |
| - }, |
277 |
| - { |
278 |
| - title: 'Relative', |
279 |
| - evaluate: |
280 |
| - (d) => ChartHelpers.relativeFormatter( |
281 |
| - ChartHelpers.relativeAccessor(d.datum, -1, d.dataset)), |
282 |
| - }, |
283 |
| - ] |
284 |
| - }, |
285 |
| - }, |
286 | 235 | },
|
287 | 236 | reload() {
|
288 | 237 | this.$$('tf-line-chart-data-loader').reload();
|
|
0 commit comments