()
| 137 | } |
| 138 | |
| 139 | get_labels() { |
| 140 | // Function to set the labels appropriately. |
| 141 | // Setting the labels to the value sent and filling in the |
| 142 | // remaining values. |
| 143 | let curve_labels = this.get('labels'); |
| 144 | const data_length = |
| 145 | this.x_data.length == 1 |
| 146 | ? this.y_data.length |
| 147 | : Math.min(this.x_data.length, this.y_data.length); |
| 148 | if (curve_labels.length > data_length) { |
| 149 | curve_labels = curve_labels.slice(0, data_length); |
| 150 | } else if (curve_labels.length < data_length) { |
| 151 | _.range(curve_labels.length, data_length).forEach((index) => { |
| 152 | curve_labels[index] = 'C' + (index + 1); |
| 153 | }); |
| 154 | } |
| 155 | return curve_labels; |
| 156 | } |
| 157 | |
| 158 | update_domains() { |
| 159 | if (!this.mark_data) { |
no test coverage detected