Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
Kolan Sh | 7748a11de4 | |
Kolan Sh | 37a8b00ae3 | |
Kolan Sh | a9d77c1109 | |
Kolan Sh | 72cd7181e1 | |
Kolan Sh | 82a991464d | |
Kolan Sh | 93cfa3148b | |
Kolan Sh | 74a5cb7fad | |
Kolan Sh | 81362d8118 | |
Kolan Sh | f40535ff18 | |
Kolan Sh | 48413deb5f |
|
@ -1,6 +1,6 @@
|
|||
[submodule "cmake/backbone"]
|
||||
path = cmake/backbone
|
||||
url = git@git.backbone.ws:make/cmake-backbone-modules.git
|
||||
url = https://git.backbone.ws/kolan/cmake.backbone.git
|
||||
[submodule "util/backbone-utils"]
|
||||
path = util/backbone
|
||||
url = git@git.backbone.ws:make/cmake-backbone-utils.git
|
||||
url = https://git.backbone.ws/kolan/cmake.backbone-utils.git
|
||||
|
|
17
README.md
17
README.md
|
@ -8,13 +8,14 @@ Git: https://git.backbone.ws/gtk/cairo-chart
|
|||
|
||||
## View YouTube movie
|
||||
|
||||
[![View video](https://img.youtube.com/vi/wmZAw2csjQg/0.jpg)](https://www.youtube.com/watch?v=wmZAw2csjQg)
|
||||
[![View video](https://img.youtube.com/vi/GpnObfofqYI/0.jpg)](https://www.youtube.com/watch?v=GpnObfofqYI)
|
||||
|
||||
## Screenshots
|
||||
![Screenshot1](https://redmine.backbone.ws/attachments/download/424/20171225_020441.png)
|
||||
![Screenshot2](https://redmine.backbone.ws/attachments/download/425/20171225_020414.png)
|
||||
![Screenshot3](https://redmine.backbone.ws/attachments/download/426/20171225_020350.png)
|
||||
![Screenshot4](https://redmine.backbone.ws/attachments/download/427/20171225_020330.png)
|
||||
![Screenshot5](https://redmine.backbone.ws/attachments/download/428/20171225_020315.png)
|
||||
![Screenshot6](https://redmine.backbone.ws/attachments/download/429/20171225_020301.png)
|
||||
![Screenshot7](https://redmine.backbone.ws/attachments/download/430/20171225_020237.png)
|
||||
![Screenshot1](https://redmine.backbone.ws/attachments/download/444/20180221_122422.png)
|
||||
![Screenshot2](https://redmine.backbone.ws/attachments/download/443/20180221_122449.png)
|
||||
![Screenshot3](https://redmine.backbone.ws/attachments/download/442/20180221_122459.png)
|
||||
![Screenshot4](https://redmine.backbone.ws/attachments/download/441/20180221_122508.png)
|
||||
![Screenshot5](https://redmine.backbone.ws/attachments/download/440/20180221_122535.png)
|
||||
![Screenshot6](https://redmine.backbone.ws/attachments/download/439/20180221_122520.png)
|
||||
![Screenshot7](https://redmine.backbone.ws/attachments/download/438/20180221_122546.png)
|
||||
![Screenshot8](https://redmine.backbone.ws/attachments/download/437/20180221_122553.png)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9ba1995060ebb1c65ac9855e3671b3992c859059
|
||||
Subproject commit 206751e1f4814716d716f6bc297c280d4bf1dcf7
|
|
@ -102,7 +102,6 @@ namespace CairoChart {
|
|||
// TODO: check format
|
||||
_format = value;
|
||||
}
|
||||
default = "%.2Lf";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -114,7 +113,6 @@ namespace CairoChart {
|
|||
// TODO: check format
|
||||
_date_format = value;
|
||||
}
|
||||
default = "%Y.%m.%d";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -126,7 +124,6 @@ namespace CairoChart {
|
|||
// TODO: check format
|
||||
_time_format = value;
|
||||
}
|
||||
default = "%H:%M:%S";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -140,7 +137,6 @@ namespace CairoChart {
|
|||
// TODO: check format
|
||||
_dsec_signs = value;
|
||||
}
|
||||
default = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,8 +9,7 @@ CONFIGURE_FILE ( "${CMAKE_SOURCE_DIR}/cmake/backbone/templates/library_construct
|
|||
INCLUDE_DIRECTORIES ("${CMAKE_SOURCE_DIR}/src")
|
||||
SET (LibCustomVapis ${CMAKE_SOURCE_DIR}/src/cairo-chart-float128type.vapi)
|
||||
INCLUDE (ValaLibCommonRules)
|
||||
INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/cairo-chart-float128type.h DESTINATION include
|
||||
RENAME cairo-chart-float128type-${MAJOR}.h)
|
||||
INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/cairo-chart-float128type-${MAJOR}.h DESTINATION include)
|
||||
INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/cairo-chart-float128type.vapi DESTINATION share/vala/vapi
|
||||
RENAME cairo-chart-float128type-${MAJOR}.vapi)
|
||||
CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/cairo-chart.deps.in
|
||||
|
|
|
@ -96,7 +96,6 @@ namespace CairoChart {
|
|||
public virtual Color color {
|
||||
protected get { return Color(); }
|
||||
set { ctx.set_source_rgba (value.red, value.green, value.blue, value.alpha); }
|
||||
default = Color();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace CairoChart {
|
|||
*/
|
||||
public Cursors copy () {
|
||||
var c = new Cursors (chart);
|
||||
c.list = list.copy();
|
||||
//c.list = list.copy();
|
||||
c.active_cursor = active_cursor;
|
||||
c.is_cursor_active = is_cursor_active;
|
||||
c.style = style;
|
||||
|
|
|
@ -51,7 +51,6 @@ namespace CairoChart {
|
|||
set {
|
||||
vspacing = hspacing = value;
|
||||
}
|
||||
default = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -77,7 +77,6 @@ namespace CairoChart {
|
|||
axis_x.grid_style.color.green = axis_y.grid_style.color.green = value.green;
|
||||
axis_x.grid_style.color.blue = axis_y.grid_style.color.blue = value.blue;
|
||||
}
|
||||
default = Color (0, 0, 0, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,12 +3,12 @@ namespace CairoChart {
|
|||
/**
|
||||
* 128-bit float type.
|
||||
*/
|
||||
[CCode (cname = "cairo_chart_float128", has_type_id = false, cheader_filename = "cairo-chart-float128type.h")]
|
||||
[CCode (cname = "cairo_chart_float128", has_type_id = false, cheader_filename = "cairo-chart-float128type-0.h")]
|
||||
public struct Float128 : double {}
|
||||
|
||||
/**
|
||||
* Long Double float type.
|
||||
*/
|
||||
[CCode (cname = "cairo_chart_long_double", has_type_id = false, cheader_filename = "cairo-chart-float128type.h")]
|
||||
[CCode (cname = "cairo_chart_long_double", has_type_id = false, cheader_filename = "cairo-chart-float128type-0.h")]
|
||||
public struct LongDouble : double {}
|
||||
}
|
||||
|
|
|
@ -300,7 +300,7 @@ int main (string[] args) {
|
|||
var radio_button8 = new RadioButton.with_label_from_widget (radio_button7, "Horizontal Cursors");
|
||||
|
||||
button1.clicked.connect (() => {
|
||||
chart = chart1; da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
chart = chart1; da.queue_draw();
|
||||
switch (chart.legend.position) {
|
||||
case Legend.Position.TOP: radio_button1.set_active(true); break;
|
||||
case Legend.Position.RIGHT: radio_button2.set_active(true); break;
|
||||
|
@ -313,7 +313,7 @@ int main (string[] args) {
|
|||
}
|
||||
});
|
||||
button2.clicked.connect (() => {
|
||||
chart = chart2; da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
chart = chart2; da.queue_draw();
|
||||
switch (chart.legend.position) {
|
||||
case Legend.Position.TOP: radio_button1.set_active(true); break;
|
||||
case Legend.Position.RIGHT: radio_button2.set_active(true); break;
|
||||
|
@ -326,7 +326,7 @@ int main (string[] args) {
|
|||
}
|
||||
});
|
||||
button3.clicked.connect (() => {
|
||||
chart = chart3; da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
chart = chart3; da.queue_draw();
|
||||
switch (chart.legend.position) {
|
||||
case Legend.Position.TOP: radio_button1.set_active(true); break;
|
||||
case Legend.Position.RIGHT: radio_button2.set_active(true); break;
|
||||
|
@ -339,7 +339,7 @@ int main (string[] args) {
|
|||
}
|
||||
});
|
||||
button4.clicked.connect (() => {
|
||||
chart = chart4; da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
chart = chart4; da.queue_draw();
|
||||
switch (chart.legend.position) {
|
||||
case Legend.Position.TOP: radio_button1.set_active(true); break;
|
||||
case Legend.Position.RIGHT: radio_button2.set_active(true); break;
|
||||
|
@ -357,7 +357,7 @@ int main (string[] args) {
|
|||
s.axis_x.title.text = "";
|
||||
s.axis_y.title.text = "";
|
||||
}
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
});
|
||||
button6.clicked.connect (() => {
|
||||
for (var i = 0; i < chart.series.length; ++i) {
|
||||
|
@ -365,7 +365,7 @@ int main (string[] args) {
|
|||
s.axis_x.date_format = "%Y.%m.%d";
|
||||
s.axis_x.time_format = "";
|
||||
}
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
});
|
||||
|
||||
button7.clicked.connect (() => {
|
||||
|
@ -374,7 +374,7 @@ int main (string[] args) {
|
|||
s.axis_x.date_format = "";
|
||||
s.axis_x.time_format = "%H:%M:%S";
|
||||
}
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
});
|
||||
|
||||
button8.clicked.connect (() => {
|
||||
|
@ -383,32 +383,32 @@ int main (string[] args) {
|
|||
s.axis_x.date_format = "%Y.%m.%d";
|
||||
s.axis_x.time_format = "%H:%M:%S";
|
||||
}
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
});
|
||||
|
||||
|
||||
radio_button1.toggled.connect ((button) => {
|
||||
if (button.get_active()) {
|
||||
chart.legend.position = Legend.Position.TOP;
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
}
|
||||
});
|
||||
radio_button2.toggled.connect ((button) => {
|
||||
if (button.get_active()) {
|
||||
chart.legend.position = Legend.Position.RIGHT;
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
}
|
||||
});
|
||||
radio_button3.toggled.connect ((button) => {
|
||||
if (button.get_active()) {
|
||||
chart.legend.position = Legend.Position.LEFT;
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
}
|
||||
});
|
||||
radio_button4.toggled.connect ((button) => {
|
||||
if (button.get_active()) {
|
||||
chart.legend.position = Legend.Position.BOTTOM;
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -418,26 +418,26 @@ int main (string[] args) {
|
|||
radio_button5.toggled.connect ((button) => {
|
||||
// TODO: set labels
|
||||
if (button.get_active()) {
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
}
|
||||
});
|
||||
radio_button6.toggled.connect ((button) => {
|
||||
// TODO: set cursors
|
||||
if (button.get_active()) {
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
}
|
||||
});*/
|
||||
|
||||
radio_button7.toggled.connect ((button) => {
|
||||
if (button.get_active()) {
|
||||
chart.cursors.style.orientation = Cursors.Orientation.VERTICAL;
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
}
|
||||
});
|
||||
radio_button8.toggled.connect ((button) => {
|
||||
if (button.get_active()) {
|
||||
chart.cursors.style.orientation = Cursors.Orientation.HORIZONTAL;
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -494,7 +494,7 @@ int main (string[] args) {
|
|||
chart.cursors.set_active (Point(event.x, event.y));
|
||||
mouse_state = MouseState.CURSOR_SELECTION;
|
||||
}
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
break;
|
||||
|
||||
case 2: // start zoom area selection
|
||||
|
@ -520,7 +520,7 @@ int main (string[] args) {
|
|||
case 1: // start cursor position selection
|
||||
if ((event.state & Gdk.ModifierType.SHIFT_MASK) != 0) { // remove cursor
|
||||
//chart.remove_active ();
|
||||
//da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
//da.queue_draw();
|
||||
//mouse_state = MouseState.FREE;
|
||||
} else { // add cursor
|
||||
chart.cursors.add_active ();
|
||||
|
@ -535,7 +535,7 @@ int main (string[] args) {
|
|||
chart.zoom_in (new Area.with_abs(sel_x0, sel_y0, sel_x1, sel_y1));
|
||||
else
|
||||
chart.zoom_out ();
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
mouse_state = MouseState.FREE;
|
||||
break;
|
||||
|
||||
|
@ -553,7 +553,7 @@ int main (string[] args) {
|
|||
case MouseState.DRAW_SELECTION:
|
||||
sel_x1 = event.x;
|
||||
sel_y1 = event.y;
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
break;
|
||||
|
||||
case MouseState.MOVING_CHART:
|
||||
|
@ -561,12 +561,12 @@ int main (string[] args) {
|
|||
chart.move (Point(){x = delta_x, y = delta_y});
|
||||
mov_x0 = event.x;
|
||||
mov_y0 = event.y;
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
break;
|
||||
|
||||
case MouseState.CURSOR_SELECTION:
|
||||
chart.cursors.set_active (Point(event.x, event.y));
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -581,7 +581,7 @@ int main (string[] args) {
|
|||
chart.zoom_scroll_out(Point(event.x, event.y));
|
||||
break;
|
||||
}
|
||||
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
|
||||
da.queue_draw();
|
||||
|
||||
//var ret = chart.scroll_notify_event(event);
|
||||
return true; // return ret;
|
||||
|
|
Loading…
Reference in New Issue