// Do the ordinary rendering, as before
this._renderLineChart();
this._renderAxis();
- this._renderChartLabels();
+ // this._renderChartLabels();
this._renderAnnotations();
};
area.w = this.dygraph_.width_ - area.x - this.attr_('rightGap');
area.h = this.dygraph_.height_;
+
+ // Let plugins reserve space.
+ var e = {
+ chart_div: this.dygraph_.graphDiv,
+ reserveSpaceLeft: function(px) {
+ var r = {
+ x: area.x,
+ y: area.y,
+ w: px,
+ h: area.h
+ };
+ area.x += px;
+ area.w -= px;
+ return r;
+ },
+ reserveSpaceTop: function(px) {
+ var r = {
+ x: area.x,
+ y: area.y,
+ w: area.w,
+ h: px
+ };
+ area.y += px;
+ area.h -= px;
+ return r;
+ },
+ chartRect: function() {
+ return {x:area.x, y:area.y, w:area.w, h:area.h};
+ }
+ };
+ this.dygraph_.cascadeEvents_('layout', e);
+
if (this.attr_('drawXAxis')) {
if (this.attr_('xAxisHeight')) {
area.h -= this.attr_('xAxisHeight');
"to use " + this.dygraph_.numAxes() + ")");
}
+/*
// Add space for chart labels: title, xlabel and ylabel.
if (this.attr_('title')) {
area.h -= this.attr_('titleHeight');
// same logic applies here as for ylabel.
// TODO(danvk): make yAxisLabelWidth a per-axis property
}
+*/
// Add space for range selector, if needed.
if (this.attr_('showRangeSelector')) {
strftime/strftime-min.js \
plugins/base.js \
plugins/legend.js \
+plugins/chart-labels \
plugins/install.js \
| perl -ne 'print unless m,REMOVE_FOR_COMBINED,..m,/REMOVE_FOR_COMBINED,' \
> /tmp/dygraph.js