()
| 96 | } |
| 97 | |
| 98 | update_domains() { |
| 99 | if (!this.mark_data) { |
| 100 | return; |
| 101 | } |
| 102 | const scales = this.getScales(); |
| 103 | const y_scale = scales.row, |
| 104 | x_scale = scales.column; |
| 105 | const color_scale = scales.color; |
| 106 | |
| 107 | if (!this.get('preserve_domain').row) { |
| 108 | y_scale.computeAndSetDomain(this.rows, this.model_id + '_row'); |
| 109 | } else { |
| 110 | y_scale.delDomain([], this.model_id + '_row'); |
| 111 | } |
| 112 | |
| 113 | if (!this.get('preserve_domain').column) { |
| 114 | x_scale.computeAndSetDomain(this.columns, this.model_id + '_column'); |
| 115 | } else { |
| 116 | x_scale.delDomain([], this.model_id + '_column'); |
| 117 | } |
| 118 | if (color_scale !== null && color_scale !== undefined) { |
| 119 | if (!this.get('preserve_domain').color) { |
| 120 | color_scale.computeAndSetDomain( |
| 121 | this.mark_data.map((elem) => elem.color), |
| 122 | this.model_id + '_color' |
| 123 | ); |
| 124 | } else { |
| 125 | color_scale.delDomain([], this.model_id + '_color'); |
| 126 | } |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | get_data_dict(data, index) { |
| 131 | return data; |
no test coverage detected