diff --git a/src/Area.vala b/src/Area.vala index 46dfd01..edab98f 100644 --- a/src/Area.vala +++ b/src/Area.vala @@ -28,7 +28,7 @@ namespace CairoChart { /** * ``Area`` width. */ - public double width { + public virtual double width { get { return x1 - x0; } @@ -40,7 +40,7 @@ namespace CairoChart { /** * ``Area`` height. */ - public double height { + public virtual double height { get { return y1 - y0; } @@ -107,7 +107,7 @@ namespace CairoChart { /** * Gets a copy of the ``Chart``. */ - public Area copy () { + public virtual Area copy () { return new Area.with_area(this); } } diff --git a/src/Chart.vala b/src/Chart.vala index 6d55e99..e52a57d 100644 --- a/src/Chart.vala +++ b/src/Chart.vala @@ -58,17 +58,17 @@ namespace CairoChart { /** * Index of the 1'st shown series in a zoomed area. */ - public int zoom_1st_idx { get; protected set; default = 0; } + public virtual int zoom_1st_idx { get; protected set; default = 0; } /** * Joint/common X axes or not. */ - public bool joint_x { get; protected set; default = false; } + public virtual bool joint_x { get; protected set; default = false; } /** * Joint/common Y axes or not. */ - public bool joint_y { get; protected set; default = false; } + public virtual bool joint_y { get; protected set; default = false; } /** * Joint/common {@link Axis} ``Color``. @@ -83,13 +83,13 @@ namespace CairoChart { /** * ``Chart`` cursors. */ - public Cursors cursors { get; protected set; default = null; } + public virtual Cursors cursors { get; protected set; default = null; } /** * Set paint color for further drawing. */ - public Color color { - private get { return Color(); } + public virtual Color color { + protected get { return Color(); } set { ctx.set_source_rgba (value.red, value.green, value.blue, value.alpha); } default = Color(); } @@ -106,7 +106,7 @@ namespace CairoChart { /** * Gets a copy of the ``Chart``. */ - public Chart copy () { + public virtual Chart copy () { var chart = new Chart (); chart.area = this.area.copy(); chart.bg_color = this.bg_color;