()
| 401 | } |
| 402 | |
| 403 | update_default_tooltip() { |
| 404 | this.tooltip_fields = this.model.get('tooltip_fields'); |
| 405 | const formats = this.model.get('tooltip_formats'); |
| 406 | this.tooltip_formats = this.tooltip_fields.map((field, index) => { |
| 407 | const fmt = formats[index]; |
| 408 | if (fmt === undefined || fmt === '') { |
| 409 | return (d) => d; |
| 410 | } else { |
| 411 | return d3.format(fmt) as (d: number) => string; |
| 412 | } |
| 413 | }); |
| 414 | } |
| 415 | |
| 416 | create_scale_views() { |
| 417 | for (const key in this.scales) { |