(stage: types.Stage)
| 13 | } |
| 14 | |
| 15 | public getCharacterSet(stage: types.Stage) { |
| 16 | if (!this.chars) { |
| 17 | const map: { [char: string]: true } = {}; |
| 18 | const addText = (text: string) => { |
| 19 | Array.from(text).forEach(char => { map[char] = true; }); |
| 20 | }; |
| 21 | stage.textData.forEach(t => addText(t.text)); |
| 22 | const { x, y, z } = stage.axes; |
| 23 | [x, y, z].forEach(axes => { |
| 24 | axes.forEach(axis => { |
| 25 | if (axis.tickText) axis.tickText.forEach(t => addText(t.text)); |
| 26 | if (axis.title) addText(axis.title.text); |
| 27 | }); |
| 28 | }); |
| 29 | this.chars = Object.keys(map); |
| 30 | } |
| 31 | return this.chars; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | function needsNewCharacterSet(oldInsight: Insight, newInsight: Insight) { |
no test coverage detected