-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy pathTMultiGraphPainter.mjs
32 lines (25 loc) · 1.03 KB
/
TMultiGraphPainter.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { TMultiGraphPainter as TMultiGraphPainter2D } from '../hist2d/TMultiGraphPainter.mjs';
import { TH1Painter } from '../hist2d/TH1Painter.mjs';
import { TH2Painter } from './TH2Painter.mjs';
import { TGraphPainter } from './TGraphPainter.mjs';
class TMultiGraphPainter extends TMultiGraphPainter2D {
/** @summary draw special histogram for axis
* @return {Promise} when ready */
async drawAxisHist(histo, hopt) {
const dom = this.getDrawDom();
return this._3d
? TH2Painter.draw(dom, histo, 'LEGO' + hopt)
: TH1Painter.draw(dom, histo, hopt);
}
/** @summary draw multi graph in 3D */
async drawGraph(dom, gr, opt, pos3d) {
if (this._3d) opt += `pos3d_${pos3d}`;
return TGraphPainter.draw(dom, gr, opt);
}
/** @summary Draw TMultiGraph object */
static async draw(dom, mgraph, opt) {
const painter = new TMultiGraphPainter(dom, mgraph, opt);
return painter.redrawWith(opt, true);
}
} // class TMultiGraphPainter
export { TMultiGraphPainter };