|
|
@@ -72,6 +72,7 @@ func NewChart(width, height float32) *Chart {
|
|
|
ch.formatY = "%v"
|
|
|
ch.fontSizeX = 14
|
|
|
ch.fontSizeY = 14
|
|
|
+ ch.Subscribe(OnResize, ch.onResize)
|
|
|
return ch
|
|
|
}
|
|
|
|
|
|
@@ -393,6 +394,12 @@ func (ch *Chart) updateGraphs() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// onResize process OnResize events for this chart
|
|
|
+func (ch *Chart) onResize(evname string, ev interface{}) {
|
|
|
+
|
|
|
+ ch.recalc()
|
|
|
+}
|
|
|
+
|
|
|
// recalc recalculates the positions of the inner panels
|
|
|
func (ch *Chart) recalc() {
|
|
|
|