Compare commits

..

244 Commits

Author SHA1 Message Date
Kolan Sh 21f8e595ec OK In progress... 2018-01-23 20:40:23 +03:00
Kolan Sh 74ba064a56 Methods order changed according to usage probabilities. 2018-01-23 20:26:21 +03:00
Kolan Sh 36aba3995a Methods order changed according to usage probabilities. 2018-01-23 20:07:43 +03:00
Kolan Sh 3fd9f3f9b1 OK In progress... 2018-01-23 20:02:56 +03:00
Kolan Sh b5a173f4ed Methods order changed according to usage probabilities. 2018-01-23 19:44:22 +03:00
Kolan Sh d285906004 OK In progress... 2018-01-23 19:16:20 +03:00
Kolan Sh e11e8466a1 OK In progress... 2018-01-23 18:51:22 +03:00
Kolan Sh 2a0870a482 OK In progress... 2018-01-23 18:49:24 +03:00
Kolan Sh 85eedafd2a OK In progress... 2018-01-23 18:42:28 +03:00
Kolan Sh 803a7c3cb6 OK In progress... 2018-01-23 18:38:30 +03:00
Kolan Sh 9c3a43590c OK In progress... 2018-01-23 18:34:55 +03:00
Kolan Sh a1af698985 OK In progress... 2018-01-23 18:33:10 +03:00
Kolan Sh 6672e08132 OK In progress... 2018-01-23 18:31:06 +03:00
Kolan Sh 2f0ee8b45a OK In progress... 2018-01-23 18:29:27 +03:00
Kolan Sh 6336779adc OK In progress... 2018-01-23 18:27:09 +03:00
Kolan Sh ea84cb3a0c OK In progress... 2018-01-23 18:22:52 +03:00
Kolan Sh 4b8947eaf3 OK In progress... 2018-01-23 18:16:52 +03:00
Kolan Sh 6e351ff465 OK In progress... 2018-01-23 18:15:27 +03:00
Kolan Sh ca6392a6d9 OK In progress... 2018-01-23 18:14:39 +03:00
Kolan Sh 9ce7f7b174 OK In progress... 2018-01-23 18:08:33 +03:00
Kolan Sh 7de36e6dad OK In progress... 2018-01-23 18:06:13 +03:00
Kolan Sh 7791e4e1a5 OK In progress... 2018-01-23 18:01:18 +03:00
Kolan Sh d8d2578b79 OK In progress... 2018-01-23 17:57:08 +03:00
Kolan Sh a0ae3227a7 OK In progress... 2018-01-23 17:47:59 +03:00
Kolan Sh c4b3002913 OK In progress... 2018-01-23 17:45:47 +03:00
Kolan Sh 7cb09a99e8 OK In progress... 2018-01-23 17:40:37 +03:00
Kolan Sh 72c2be67d4 OK In progress... 2018-01-23 17:38:51 +03:00
Kolan Sh a0fd760218 OK In progress... 2018-01-23 17:28:30 +03:00
Kolan Sh 50bf6bcdc3 OK In progress... 2018-01-23 17:11:13 +03:00
Kolan Sh c07de77845 OK In progress... 2018-01-23 17:08:55 +03:00
Kolan Sh 63346514fd OK In progress... 2018-01-23 17:01:47 +03:00
Kolan Sh f844b70f26 OK In progress... 2018-01-23 16:37:46 +03:00
Kolan Sh 08e154ce6a OK In progress... 2018-01-23 15:20:13 +03:00
Kolan Sh fa93997f27 OK In progress... 2018-01-23 15:16:01 +03:00
Kolan Sh 7759d914a0 OK In progress... 2018-01-23 13:46:55 +03:00
Kolan Sh dc60f2ea92 OK In progress... 2018-01-23 13:40:45 +03:00
Kolan Sh ca63a3af3b OK In progress... 2018-01-23 13:36:56 +03:00
Kolan Sh bb2b61421b OK In progress... 2018-01-23 13:22:05 +03:00
Kolan Sh e7cb034b68 OK In progress... 2018-01-23 13:19:28 +03:00
Kolan Sh c35376d566 OK In progress... 2018-01-23 12:56:47 +03:00
Kolan Sh e7d9dfb5d3 OK In progress... 2018-01-23 12:48:20 +03:00
Kolan Sh 4191423b91 OK In progress... 2018-01-23 12:41:20 +03:00
Kolan Sh a1709429fa tmp2 2018-01-23 12:29:59 +03:00
Kolan Sh 615c333baf tmp1 2018-01-23 12:27:02 +03:00
Kolan Sh e9ab537a56 Copy methods Series.vala -> Axis.vala. 2018-01-23 11:39:01 +03:00
Kolan Sh ee6dde9731 OK In progress... 2018-01-23 09:46:26 +03:00
Kolan Sh 796cabe307 OK In progress... 2018-01-22 20:43:14 +03:00
Kolan Sh 3e89c9dfdf In progress... 2018-01-22 20:39:32 +03:00
Kolan Sh 30c15c62bc OK In progress... 2018-01-22 20:07:19 +03:00
Kolan Sh e02c30e374 OK In progress... 2018-01-22 19:24:33 +03:00
Kolan Sh 8bc81c7508 OK In progress... 2018-01-22 19:21:29 +03:00
Kolan Sh 10fc250f5f OK In progress... 2018-01-22 19:03:31 +03:00
Kolan Sh 6de38bdb9f OK In progress... 2018-01-22 18:54:18 +03:00
Kolan Sh 6f7bc6761d OK In progress... 2018-01-22 18:47:24 +03:00
Kolan Sh 5c556195e3 In progress... 2018-01-22 18:40:59 +03:00
Kolan Sh 8aeadccda2 In progress... 2018-01-22 18:37:27 +03:00
Kolan Sh bd83013c40 OK In progress... 2018-01-22 18:21:29 +03:00
Kolan Sh 5b8b712cea OK In progress... 2018-01-22 18:12:06 +03:00
Kolan Sh d676040023 OK In progress... 2018-01-22 17:48:48 +03:00
Kolan Sh 7029f1f906 OK In progress... 2018-01-22 17:47:00 +03:00
Kolan Sh 1eee87fb1a OK In progress... 2018-01-22 17:31:43 +03:00
Kolan Sh 820e5d4526 OK In progress... 2018-01-22 17:20:45 +03:00
Kolan Sh 171c5d51ba OK In progress... 2018-01-22 16:57:15 +03:00
Kolan Sh b401f53077 OK In progress... 2018-01-22 16:56:08 +03:00
Kolan Sh 4626587d45 OK In progress... 2018-01-22 16:54:54 +03:00
Kolan Sh 491c303d4f OK In progress... 2018-01-22 16:49:28 +03:00
Kolan Sh 26334b2704 OK In progress... 2018-01-22 16:28:09 +03:00
Kolan Sh 18968bd3a9 OK In progress... 2018-01-22 16:22:47 +03:00
Kolan Sh 96d275c339 OK In progress... 2018-01-22 16:14:49 +03:00
Kolan Sh d24149d215 OK In progress... 2018-01-22 16:14:06 +03:00
Kolan Sh e0f9197cea OK In progress... 2018-01-22 16:00:39 +03:00
Kolan Sh 0d142ac4db OK In progress... 2018-01-22 15:52:50 +03:00
Kolan Sh 4628b6cdd7 OK In progress... 2018-01-22 15:49:49 +03:00
Kolan Sh 5342b49bf7 OK In progress... 2018-01-22 15:10:47 +03:00
Kolan Sh 5db6dfc490 OK In progress... 2018-01-22 15:07:19 +03:00
Kolan Sh b46de48825 OK In progress... 2018-01-22 15:03:10 +03:00
Kolan Sh e5c0f4d898 OK In progress... 2018-01-22 14:58:41 +03:00
Kolan Sh d3f73e135b OK In progress... 2018-01-22 14:54:58 +03:00
Kolan Sh 857b6f38e4 In progress... 2018-01-22 14:54:08 +03:00
Kolan Sh 1161b6a75b OK In progress... 2018-01-22 14:46:00 +03:00
Kolan Sh 47bc860e3d OK In progress... 2018-01-22 14:44:31 +03:00
Kolan Sh bcb847c65e OK In progress... 2018-01-22 14:31:34 +03:00
Kolan Sh ded95b77ce OK In progress... 2018-01-22 14:15:58 +03:00
Kolan Sh f304e98f80 OK In progress... 2018-01-22 14:14:20 +03:00
Kolan Sh 56ed4a5f3e OK In progress... 2018-01-22 13:42:04 +03:00
Kolan Sh 946974b3d0 OK In progress... 2018-01-22 13:39:26 +03:00
Kolan Sh 644c7b4409 OK In progress... 2018-01-22 13:28:13 +03:00
Kolan Sh 97721385fc OK In progress... 2018-01-22 13:28:13 +03:00
Kolan Sh 9d1f368a93 OK In progress... 2018-01-22 13:28:13 +03:00
Kolan Sh 31beca41d7 OK In progress... 2018-01-22 13:28:13 +03:00
Kolan Sh d867098745 OK In progress... 2018-01-22 13:28:13 +03:00
Kolan Sh a6839c3211 OK In progress... 2018-01-22 13:28:13 +03:00
Kolan Sh e01bc80210 OK In progress... 2018-01-22 13:28:13 +03:00
Kolan Sh cf0e81e076 OK In progress... 2018-01-22 13:28:13 +03:00
Kolan Sh b4ada02aa5 OK In progress... 2018-01-22 13:28:05 +03:00
Kolan Sh 6adc0a57b6 OK In progress... 2018-01-22 12:25:17 +03:00
Kolan Sh b382247757 OK In progress... 2018-01-22 09:19:04 +03:00
Kolan Sh e402ee7ec4 OK In progress... 2018-01-22 09:10:03 +03:00
Kolan Sh 46fe83e78c OK In progress... 2018-01-22 09:06:24 +03:00
Kolan Sh 4e6045d160 OK In progress... 2018-01-22 09:04:26 +03:00
Kolan Sh 9a03af4b85 OK In progress... 2018-01-22 08:57:36 +03:00
Kolan Sh cf0527be5f OK In progress... 2018-01-22 08:55:59 +03:00
Kolan Sh fb190923ab OK In progress... 2018-01-21 20:50:42 +03:00
Kolan Sh d0c87519ee OK In progress... 2018-01-21 20:37:04 +03:00
Kolan Sh b7f6e6cf79 OK In progress... 2018-01-21 20:16:01 +03:00
Kolan Sh 26030290d4 Fixes #148: legend.show ignored, fix it 2018-01-21 19:59:13 +03:00
Kolan Sh a3f83df580 Fixes #151: Chart.title.font.size = 400 -> empty space in the bootom of the chart. 2018-01-21 19:52:48 +03:00
Kolan Sh e6cad468e0 Fixes #152: Different series title sizes not vcentered in the top/bottom legend. 2018-01-21 19:44:08 +03:00
Kolan Sh a45ac5d20f OK In progress... 2018-01-21 19:18:54 +03:00
Kolan Sh bd4e6089c9 OK In progress... 2018-01-21 18:56:27 +03:00
Kolan Sh ee52791eca OK In progress... 2018-01-21 18:41:41 +03:00
Kolan Sh 2d4d01d532 OK In progress... 2018-01-21 17:27:46 +03:00
Kolan Sh dc9b896232 In progress... 2018-01-21 15:41:04 +03:00
Kolan Sh d9f79241dc In progress... 2018-01-21 15:36:08 +03:00
Kolan Sh 67a8067bd4 OK In progress... 2018-01-21 15:18:34 +03:00
Kolan Sh dd7ee462c8 OK In progress... 2018-01-21 14:14:57 +03:00
Kolan Sh 94734a26fc OK In progress... 2018-01-21 13:56:29 +03:00
Kolan Sh 2e625bf58c OK In progress... 2018-01-21 13:40:00 +03:00
Kolan Sh 56dcbf348d OK In progress... 2018-01-21 13:27:47 +03:00
Kolan Sh 2f0aa310b9 OK In progress... 2018-01-21 13:04:02 +03:00
Kolan Sh 2059f787af OK In progress... 2018-01-21 12:57:31 +03:00
Kolan Sh fca07bd695 OK In progress... 2018-01-21 12:55:03 +03:00
Kolan Sh 3d3eb05c3c OK In progress... 2018-01-21 12:34:57 +03:00
Kolan Sh d5e18999f8 OK In progress... 2018-01-20 20:22:08 +03:00
Kolan Sh 545221c11f OK In progress... 2018-01-20 20:07:06 +03:00
Kolan Sh 5c8904d502 OK In progress... 2018-01-20 14:51:26 +03:00
Kolan Sh 6bbce0fd5e OK In progress... 2018-01-20 14:43:21 +03:00
Kolan Sh 21c39c46a0 In progress... 2018-01-20 13:46:22 +03:00
Kolan Sh 2390bfdf8d In progress... 2018-01-20 13:27:10 +03:00
Kolan Sh 620a1c167c OK In progress... 2018-01-20 13:22:48 +03:00
Kolan Sh 89132d91fc In progress... 2018-01-20 12:43:02 +03:00
Kolan Sh 7fcacaed2d In progress... 2018-01-19 21:31:59 +03:00
Kolan Sh ca8340946b In progress... 2018-01-19 20:35:22 +03:00
Kolan Sh 3c295b0bf8 In progress... 2018-01-19 20:34:08 +03:00
Kolan Sh 80cc8bfade In progress... 2018-01-19 19:56:10 +03:00
Kolan Sh 54b8d430dc In progress... 2018-01-19 18:22:22 +03:00
Kolan Sh 5f39fa57b6 OK In progress... 2018-01-19 18:15:51 +03:00
Kolan Sh f60b3f474e OK In progress... 2018-01-19 18:13:27 +03:00
Kolan Sh 776ff5e01b OK In progress... 2018-01-19 18:12:06 +03:00
Kolan Sh ad04ed2e2a OK In progress... 2018-01-19 17:58:11 +03:00
Kolan Sh 15e244ada3 OK In progress... 2018-01-19 17:43:20 +03:00
Kolan Sh 548863c0e8 OK In progress... 2018-01-19 17:34:30 +03:00
Kolan Sh 277e0a407b OK In progress... 2018-01-19 17:20:23 +03:00
Kolan Sh 0336a401ec OK In progress... 2018-01-19 16:33:27 +03:00
Kolan Sh a0ba04bdad OK In progress... 2018-01-19 16:29:56 +03:00
Kolan Sh 40ca272825 OK In progress... 2018-01-19 16:26:46 +03:00
Kolan Sh c3acff1a4c OK In progress... 2018-01-19 16:25:16 +03:00
Kolan Sh b77501b03c In progress... 2018-01-19 16:08:30 +03:00
Kolan Sh 036d9db437 In progress... 2018-01-19 16:04:16 +03:00
Kolan Sh 6e09e42b95 In progress... 2018-01-19 15:52:14 +03:00
Kolan Sh b685e371dd In progress... 2018-01-19 15:51:00 +03:00
Kolan Sh b623e216dc In progress... 2018-01-19 15:49:26 +03:00
Kolan Sh 825f9ac978 In progress... 2018-01-19 15:13:28 +03:00
Kolan Sh 26212825dd fix_mv 2018-01-19 15:05:47 +03:00
Kolan Sh 3a00c0c9d7 OK In progress... 2018-01-19 14:32:24 +03:00
Kolan Sh d77af13521 OK In progress... 2018-01-19 14:25:53 +03:00
Kolan Sh e2c43bad45 OK In progress... 2018-01-19 14:22:22 +03:00
Kolan Sh 54d805fc36 OK In progress... 2018-01-19 14:17:57 +03:00
Kolan Sh 715d4185b8 OK In progress... 2018-01-19 14:09:50 +03:00
Kolan Sh e48c8a1f5a OK In progress... 2018-01-19 14:02:41 +03:00
Kolan Sh 014761c393 OK In progress... 2018-01-19 14:00:44 +03:00
Kolan Sh 7aedf10a4e OK In progress... 2018-01-19 13:56:18 +03:00
Kolan Sh 229adb7028 In progress... 2018-01-19 13:50:00 +03:00
Kolan Sh a2ed8e2e25 In progress... 2018-01-19 13:45:21 +03:00
Kolan Sh 0a1ccba521 In progress... 2018-01-19 13:29:12 +03:00
Kolan Sh 11b87fe895 In progress... 2018-01-19 11:49:46 +03:00
Kolan Sh 6b0013eb8e In progress... 2018-01-19 11:44:02 +03:00
Kolan Sh 9004e4e835 In progress... 2018-01-19 11:36:33 +03:00
Kolan Sh 35018eeb4d In progress... 2018-01-19 11:27:49 +03:00
Kolan Sh 0a24356ae6 In progress... 2018-01-19 11:23:40 +03:00
Kolan Sh b2d629c455 In progress... 2018-01-19 11:09:33 +03:00
Kolan Sh 272cefc395 In progress... 2018-01-19 10:52:06 +03:00
Kolan Sh 92c3548943 In progress... 2018-01-19 10:40:35 +03:00
Kolan Sh 91cd77c5cd In progress... 2018-01-19 10:31:51 +03:00
Kolan Sh ad5c5420b0 In progress... 2018-01-19 10:07:11 +03:00
Kolan Sh 219a27f73c In progress... 2018-01-18 21:17:49 +03:00
Kolan Sh 0fed63c109 In progress... 2018-01-18 20:43:52 +03:00
Kolan Sh 3aaa53e96c In progress... 2018-01-18 18:51:06 +03:00
Kolan Sh a8d3939ff6 In progress... 2018-01-18 18:38:22 +03:00
Kolan Sh 3dd7e4ce88 In progress... 2018-01-18 18:10:28 +03:00
Kolan Sh 29b4cac4f9 In progress... 2018-01-18 17:53:12 +03:00
Kolan Sh 87e05a20b2 In progress... 2018-01-18 17:23:31 +03:00
Kolan Sh ebd7e17978 In progress... 2018-01-18 17:20:06 +03:00
Kolan Sh d3209aec5b In progress... 2018-01-18 17:14:54 +03:00
Kolan Sh b4bc90c45d In progress... 2018-01-18 16:57:39 +03:00
Kolan Sh e0bf3884c4 In progress... 2018-01-18 16:53:47 +03:00
Kolan Sh 55f2ced6bb OK In progress... 2018-01-18 16:27:53 +03:00
Kolan Sh ada0922c69 OK In progress... 2018-01-18 13:52:06 +03:00
Kolan Sh cb90a82119 OK In progress... 2018-01-18 12:55:20 +03:00
Kolan Sh 2d1f588393 OK In progress... 2018-01-18 12:29:43 +03:00
Kolan Sh b14abc7ef6 OK In progress... 2018-01-18 12:22:49 +03:00
Kolan Sh 7bb7ca1b6f OK In progress... 2018-01-18 11:30:18 +03:00
Kolan Sh 43836e1c56 In progress... 2018-01-17 12:46:25 +03:00
Kolan Sh a79254c716 In progress... 2018-01-17 10:36:10 +03:00
Kolan Sh df3c3b1693 In progress... 2018-01-17 10:18:47 +03:00
Kolan Sh 621dd5f685 In progress... 2018-01-16 21:01:24 +03:00
Kolan Sh cb4f15f24d In progress... 2018-01-16 20:52:39 +03:00
Kolan Sh 1aed98dfec OK. In progress... 2018-01-16 20:40:00 +03:00
Kolan Sh efa0c07ccb OK. In progress... 2018-01-16 20:09:15 +03:00
Kolan Sh 8fd012dce5 In progress... 2018-01-16 19:51:31 +03:00
Kolan Sh 374b07e049 In progress... 2018-01-16 19:38:43 +03:00
Kolan Sh 117796a64c In progress... 2018-01-16 19:31:32 +03:00
Kolan Sh b6a8c4e6ee In progress... 2018-01-16 18:49:37 +03:00
Kolan Sh fb7971fed6 In progress... 2018-01-16 15:06:10 +03:00
Kolan Sh 597007a6f9 In progress... 2018-01-16 14:59:00 +03:00
Kolan Sh e682d881ff In progress... 2018-01-16 14:42:23 +03:00
Kolan Sh e5fa432384 In progress... 2018-01-16 14:29:24 +03:00
Kolan Sh bc63b1ef99 In progress... 2018-01-16 14:17:14 +03:00
Kolan Sh 7db26d2154 In progress... 2018-01-16 13:39:17 +03:00
Kolan Sh 20e73e9649 In progress... 2018-01-16 13:19:28 +03:00
Kolan Sh f5beec873b In progress... 2018-01-16 13:11:25 +03:00
Kolan Sh 0cc6f1cf07 In progress... 2018-01-16 12:09:21 +03:00
Kolan Sh bcad51fa89 OK Chart:Cursors/Crosses -> Cursor.vala 2018-01-16 11:44:44 +03:00
Kolan Sh 57d5b886d4 OK draw_axes -> Series.vala, In progress... 2018-01-16 09:31:13 +03:00
Kolan Sh c73ad17848 OK. In progress... 2018-01-15 20:05:33 +03:00
Kolan Sh a0b1c0fb6a In progress... 2018-01-15 18:58:23 +03:00
Kolan Sh bd232baeb8 In progress... 2018-01-15 18:54:07 +03:00
Kolan Sh 5b32dbec64 In progress... 2018-01-15 18:51:11 +03:00
Kolan Sh c948a37cea In progress... 2018-01-15 18:36:58 +03:00
Kolan Sh 42feb73732 In progress... 2018-01-15 18:11:38 +03:00
Kolan Sh 4ff32b797e join_calc_{x,y}() -> join_calc(bool) 2018-01-15 17:27:05 +03:00
Kolan Sh a3bbf50b6f Separate join_calc_{x,y}() added. 2018-01-15 16:40:14 +03:00
Kolan Sh dcfb85126e In progress... 2018-01-15 16:18:47 +03:00
Kolan Sh 328a579ad7 join_relative_x_axes -> Series.vala 2018-01-15 15:11:41 +03:00
Kolan Sh eb8fada021 join_relative_y_axes -> Series.vala 2018-01-15 14:57:35 +03:00
Kolan Sh 2b25f9c554 join relative y-axes with non-intersect places 2018-01-15 14:51:16 +03:00
Kolan Sh db93ad0bd3 join relative x-axes with non-intersect places 2018-01-15 14:33:56 +03:00
Kolan Sh a7aa97bea5 Join axes... 2018-01-15 13:12:42 +03:00
Kolan Sh 73b0ebdcb0 draw_series() -> Series.vala 2018-01-15 12:34:54 +03:00
Kolan Sh a73d81fc89 Most of methods should be virtual. 2018-01-15 12:05:21 +03:00
Kolan Sh 1d9912da49 Default Marker.Type value changed to NONE. 2018-01-15 11:21:44 +03:00
Kolan Sh 4fdde11861 In progress... 2018-01-10 16:24:37 +03:00
Kolan Sh 348fae7605 Math.vala updated #3 2018-01-10 16:09:54 +03:00
Kolan Sh 3a57fdfde1 Math.vala updated #2 2018-01-10 15:34:45 +03:00
Kolan Sh 912446f296 Math.vala created #1 2018-01-10 15:28:14 +03:00
Kolan Sh d114385034 calc_axis_rec_sizes() -> Axis.vala 2018-01-10 14:17:44 +03:00
Kolan Sh c0ca87a207 In progress... 2018-01-10 14:02:08 +03:00
Kolan Sh 76fb9d8797 Marker.vala ... #2 2018-01-10 12:58:35 +03:00
Kolan Sh 6e577891ae Marker.vala created #1 2018-01-10 11:32:51 +03:00
Kolan Sh 94ed3ecabb set_line_style() -> Line.vala 2018-01-10 11:19:33 +03:00
Kolan Sh eeb6fca796 rel_zoom -> rz 2018-01-10 11:13:29 +03:00
Kolan Sh 00278899fd In progress... show_text() -> Text.vala #2 2018-01-10 11:06:43 +03:00
Kolan Sh 6f5e5773d2 In progress... show_text() -> Text.vala 2018-01-10 11:02:47 +03:00
Kolan Sh d67e2c2691 In progress... Before Moscow 09.01 2018-01-10 10:54:32 +03:00
11 changed files with 125 additions and 304 deletions

View File

@ -6,8 +6,8 @@ SET (PROJECT_LOWERCASE_NAME "cairo-chart")
SET (PROJECT_DESCRIPTION "GtkChart for Gtk.DrawingArea (Cairo).")
SET (MAJOR 0)
SET (MINOR 2)
SET (PATCH 0)
SET (MINOR 1)
SET (PATCH 1)
LIST (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/backbone)

View File

@ -8,14 +8,13 @@ Git: https://git.backbone.ws/gtk/cairo-chart
## View YouTube movie
[![View video](https://img.youtube.com/vi/GpnObfofqYI/0.jpg)](https://www.youtube.com/watch?v=GpnObfofqYI)
[![View video](https://img.youtube.com/vi/wmZAw2csjQg/0.jpg)](https://www.youtube.com/watch?v=wmZAw2csjQg)
## Screenshots
![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)
![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)

@ -1 +1 @@
Subproject commit 9ba1995060ebb1c65ac9855e3671b3992c859059
Subproject commit 5aec8e830a52e88f61c8844ac15dca72b1ef7f06

View File

@ -156,12 +156,12 @@ namespace CairoChart {
/**
* ``Axis`` line style.
*/
public LineStyle grid_style = LineStyle(Color(0, 0, 0, 0.25)); // Color(), 1, {2, 3});
public LineStyle grid_style = LineStyle (Color(), 1, {2, 3});
/**
* Number of equally placed points to evaluate records sizes.
*/
public int nrecords = 8;
public int nrecords = 128;
/**
* Constructs a new ``Axis``.
@ -250,7 +250,7 @@ namespace CairoChart {
}
/**
* Draws axis.
* Draws horizontal axis.
* @param nskip number of series to skip printing.
*/
public virtual void draw (ref int nskip) {
@ -305,40 +305,6 @@ namespace CairoChart {
}
}
var max_rec_spacing = 2 * (is_x ? font.vspacing : font.hspacing);
var max_title_width = title.text == "" ? 0 : title.width + font.hspacing;
var max_title_height = title.text == "" ? 0 : title.height + font.vspacing;
var dx = max_rec_width + max_rec_spacing + max_title_width;
var dy = max_rec_height + max_rec_spacing + max_title_height;
chart.evarea.x0 -= dx; chart.evarea.x1 += dx; chart.evarea.y0 -= dy; chart.evarea.y1 += dy;
if (nskip != 0)
--nskip;
else {
var max_rec_height_all = max_rec_height;
var max_rec_width_all = max_rec_width;
if (is_x)
join_rel_axes (si, true, ref max_rec_width_all, ref max_rec_height_all, ref max_rec_spacing, ref max_title_height, ref nskip);
else
join_rel_axes (si, true, ref max_rec_width_all, ref max_rec_height_all, ref max_rec_spacing, ref max_title_width, ref nskip);
if (is_x && (!chart.joint_x || si == chart.zoom_1st_idx)) {
var tmp = max_rec_height_all + max_rec_spacing + max_title_height;
switch (position) {
case Position.LOW: chart.evarea.y1 -= tmp; break;
case Position.HIGH: chart.evarea.y0 += tmp; break;
}
}
if (!is_x && (!chart.joint_y || si == chart.zoom_1st_idx)) {
var tmp = max_rec_width_all + max_rec_spacing + max_title_width;
switch (position) {
case Position.LOW: chart.evarea.x0 += tmp; break;
case Position.HIGH: chart.evarea.x1 -= tmp; break;
}
}
}
// 4.5. Draw Axis title
if (title.text != "") {
if (is_x) {
@ -373,9 +339,26 @@ namespace CairoChart {
if (is_x) draw_recs (min, step, max_rec_height);
else draw_recs (min, step, max_rec_width);
chart.evarea.x0 += dx; chart.evarea.x1 -= dx; chart.evarea.y0 += dy; chart.evarea.y1 -= dy;
chart.ctx.stroke ();
var tmp1 = 0.0, tmp2 = 0.0, tmp3 = 0.0, tmp4 = 0.0;
join_rel_axes (si, false, ref tmp1, ref tmp2, ref tmp3, ref tmp4, ref nskip);
if (nskip != 0) {--nskip; return;}
var tmp = 0.0;
if (is_x) tmp = max_rec_height + font.vspacing + (title.text == "" ? 0 : title.height + font.vspacing);
else tmp = max_rec_width + font.hspacing + (title.text == "" ? 0 : title.width + font.hspacing);
switch (position) {
case Position.LOW:
if (is_x) chart.evarea.y1 -= tmp;
else chart.evarea.x0 += tmp;
break;
case Position.HIGH:
if (is_x) chart.evarea.y0 += tmp;
else chart.evarea.x1 -= tmp;
break;
}
}
/**
@ -383,29 +366,30 @@ namespace CairoChart {
* @param nskip returns number of series to skip printing.
*/
public virtual void join_axes (ref int nskip) {
Axis axis = this;
if (!ser.zoom_show) return;
if (nskip != 0) {--nskip; return;}
var max_rec_width = 0.0, max_rec_height = 0.0;
calc_rec_sizes (this, out max_rec_width, out max_rec_height, is_x);
var max_rec_spacing = 2 * (is_x ? font.vspacing : font.hspacing);
var max_title_width = title.text == "" ? 0 : title.width + font.hspacing;
var max_title_height = title.text == "" ? 0 : title.height + font.vspacing;
calc_rec_sizes (axis, out max_rec_width, out max_rec_height, is_x);
var max_font_spacing = is_x ? axis.font.vspacing : axis.font.hspacing;
var max_axis_font_width = axis.title.text == "" ? 0 : axis.title.width + axis.font.hspacing;
var max_axis_font_height = axis.title.text == "" ? 0 : axis.title.height + axis.font.vspacing;
var si = Math.find_arr<Series>(chart.series, ser);
if (si == -1) return;
if (is_x)
join_rel_axes (si, true, ref max_rec_width, ref max_rec_height, ref max_rec_spacing, ref max_title_height, ref nskip);
join_rel_axes (si, true, ref max_rec_width, ref max_rec_height, ref max_font_spacing, ref max_axis_font_height, ref nskip);
else
join_rel_axes (si, true, ref max_rec_width, ref max_rec_height, ref max_rec_spacing, ref max_title_width, ref nskip);
join_rel_axes (si, true, ref max_rec_width, ref max_rec_height, ref max_font_spacing, ref max_axis_font_width, ref nskip);
// for 4.2. Cursor values for joint X axis
if (si == chart.zoom_1st_idx && chart.cursors.has_crossings) {
switch (chart.cursors.style.orientation) {
case Cursors.Orientation.VERTICAL:
if (is_x && chart.joint_x) {
var tmp = max_rec_height + font.vspacing;
switch (position) {
var tmp = max_rec_height + axis.font.vspacing;
switch (axis.position) {
case Position.LOW: chart.plarea.y1 -= tmp; break;
case Position.HIGH: chart.plarea.y0 += tmp; break;
}
@ -423,14 +407,14 @@ namespace CairoChart {
}
}
if (is_x && (!chart.joint_x || si == chart.zoom_1st_idx)) {
var tmp = max_rec_height + max_rec_spacing + max_title_height;
switch (position) {
var tmp = max_rec_height + max_font_spacing + max_axis_font_height;
switch (axis.position) {
case Position.LOW: chart.plarea.y1 -= tmp; break;
case Position.HIGH: chart.plarea.y0 += tmp; break;
}
}
if (!is_x && (!chart.joint_y || si == chart.zoom_1st_idx)) {
var tmp = max_rec_width + max_rec_spacing + max_title_width;
var tmp = max_rec_width + max_font_spacing + max_axis_font_width;
switch (position) {
case Position.LOW: chart.plarea.x0 += tmp; break;
case Position.HIGH: chart.plarea.x1 -= tmp; break;
@ -445,8 +429,8 @@ namespace CairoChart {
switch (axis.dtype) {
case DType.NUMBERS:
var text = new Text (chart, axis.format.printf((LongDouble)x) + (horizontal ? "_" : ""), axis.font);
max_rec_width = double.max (max_rec_width, text.width + 2 * text.font.hspacing);
max_rec_height = double.max (max_rec_height, text.height + 2 * text.font.vspacing);
max_rec_width = double.max (max_rec_width, text.width);
max_rec_height = double.max (max_rec_height, text.height);
break;
case DType.DATE_TIME:
string date, time;
@ -455,12 +439,12 @@ namespace CairoChart {
var h = 0.0;
if (axis.date_format != "") {
var text = new Text (chart, date + (horizontal ? "_" : ""), axis.font);
max_rec_width = double.max (max_rec_width, text.width + 2 * text.font.hspacing);
max_rec_width = double.max (max_rec_width, text.width);
h = text.height;
}
if (axis.time_format != "") {
var text = new Text (chart, time + (horizontal ? "_" : ""), axis.font);
max_rec_width = double.max (max_rec_width, text.width + 2 * text.font.hspacing);
max_rec_width = double.max (max_rec_width, text.width);
h += text.height;
}
max_rec_height = double.max (max_rec_height, h);
@ -473,8 +457,8 @@ namespace CairoChart {
bool calc_max_values,
ref double max_rec_width,
ref double max_rec_height,
ref double max_rec_spacing,
ref double max_title_size,
ref double max_font_spacing,
ref double max_axis_font_size,
ref int nskip) {
for (int sj = si - 1; sj >= 0; --sj) {
var s2 = chart.series[sj];
@ -497,13 +481,11 @@ namespace CairoChart {
calc_rec_sizes (a2, out tmp_max_rec_width, out tmp_max_rec_height, is_x);
max_rec_width = double.max (max_rec_width, tmp_max_rec_width);
max_rec_height = double.max (max_rec_height, tmp_max_rec_height);
max_rec_spacing = double.max (max_rec_spacing, 2 * (is_x ? a2.font.vspacing : a2.font.hspacing));
max_title_size = double.max (
max_title_size,
a2.title.text == "" ? 0
: is_x ? a2.title.height + font.vspacing
: a2.title.width + font.hspacing
);
max_font_spacing = double.max (max_font_spacing, is_x ? a2.font.vspacing : a2.font.hspacing);
max_axis_font_size = double.max (max_axis_font_size,
a2.title.text == "" ? 0
: is_x ? a2.title.height + font.vspacing
: a2.title.width + font.hspacing);
}
++nskip;
} else {
@ -516,9 +498,8 @@ namespace CairoChart {
for (Float128 v = min; Math.point_belong (v, min, range.zmax); v += step) {
if (is_x && chart.joint_x || !is_x && chart.joint_y) {
chart.color = chart.joint_color;
grid_style.color.red = chart.joint_color.red;
grid_style.color.green = chart.joint_color.green;
grid_style.color.blue = chart.joint_color.blue;
ser.axis_x.grid_style.color = Color(0, 0, 0, 0.5);
ser.axis_y.grid_style.color = Color(0, 0, 0, 0.5);
} else
chart.color = color;
string text = "", time_text = ""; var time_text_t = new Text(chart); var crpt = 0.0;

View File

@ -45,11 +45,6 @@ namespace CairoChart {
*/
public LineStyle selection_style = LineStyle ();
/**
* Zoom Scroll speed.
*/
public double zoom_scroll_speed = 64.0;
/**
* Plot area bounds.
*/
@ -187,7 +182,7 @@ namespace CairoChart {
}
/**
* Zooms in the ``Chart``.
* Zooms the ``Chart``.
* @param area selected zoom area.
*/
public virtual void zoom_in (Area area) {
@ -267,8 +262,6 @@ namespace CairoChart {
public virtual void move (Point delta) {
var d = delta;
if (plarea.width.abs() < 1 || plarea.height.abs() < 1) return;
d.x /= -plarea.width; d.y /= -plarea.height;
var z = zoom.copy();
@ -284,10 +277,13 @@ namespace CairoChart {
d.x *= z.width; d.y *= z.height;
var px1 = plarea.x1;
var py1 = plarea.y1;
if (x0 + d.x < plarea.x0) d.x = plarea.x0 - x0;
if (x1 + d.x > plarea.x1) d.x = plarea.x1 - x1;
if (x1 + d.x > px1) d.x = px1 - x1;
if (y0 + d.y < plarea.y0) d.y = plarea.y0 - y0;
if (y1 + d.y > plarea.y1) d.y = plarea.y1 - y1;
if (y1 + d.y > py1) d.y = py1 - y1;
zoom_in(
new Area.with_rel(
@ -299,52 +295,6 @@ namespace CairoChart {
);
}
/**
* Zooms in the ``Chart`` by event point (scrolling).
* @param p event position.
*/
public virtual void zoom_scroll_in (Point p) {
var w = plarea.width, h = plarea.height;
if (w < 8 || h < 8) return;
zoom_in (
new Area.with_abs(
plarea.x0 + (p.x - plarea.x0) / w * zoom_scroll_speed,
plarea.y0 + (p.y - plarea.y0) / h * zoom_scroll_speed,
plarea.x1 - (plarea.x1 - p.x) / w * zoom_scroll_speed,
plarea.y1 - (plarea.y1 - p.y) / h * zoom_scroll_speed
)
);
}
/**
* Zooms out the ``Chart`` by event point (scrolling).
* @param p event position.
*/
public virtual void zoom_scroll_out (Point p) {
var z = zoom.copy(), pa = plarea.copy();
var w = plarea.width, h = plarea.height;
if (w < 8 || h < 8) return;
zoom_out();
var x0 = plarea.x0 + plarea.width * z.x0;
var x1 = plarea.x0 + plarea.width * z.x1;
var y0 = plarea.y0 + plarea.height * z.y0;
var y1 = plarea.y0 + plarea.height * z.y1;
var dx0 = (p.x - pa.x0) / w * zoom_scroll_speed;
var dx1 = (pa.x1 - p.x) / w * zoom_scroll_speed;
var dy0 = (p.y - pa.y0) / h * zoom_scroll_speed;
var dy1 = (pa.y1 - p.y) / h * zoom_scroll_speed;
if (x0 - dx0 < plarea.x0) x0 = plarea.x0; else x0 -= dx0;
if (x1 + dx1 > plarea.x1) x1 = plarea.x1; else x1 += dx1;
if (y0 - dy0 < plarea.y0) y0 = plarea.y0; else y0 -= dy0;
if (y1 + dy1 > plarea.y1) y1 = plarea.y1; else y1 += dy1;
zoom_in (new Area.with_abs(x0, y0, x1, y1));
}
protected virtual void fix_evarea () {
if (evarea.width < 0) evarea.width = 0;
if (evarea.height < 0) evarea.height = 0;
@ -380,6 +330,13 @@ namespace CairoChart {
protected virtual void eval_plarea () {
plarea = evarea.copy();
if (legend.show)
switch(legend.position) {
case Legend.Position.TOP: plarea.y0 += legend.spacing; break;
case Legend.Position.BOTTOM: plarea.y1 -= legend.spacing; break;
case Legend.Position.LEFT: plarea.x0 += legend.spacing; break;
case Legend.Position.RIGHT: plarea.x1 -= legend.spacing; break;
}
// Check for joint axes
joint_x = joint_y = true;
@ -400,8 +357,8 @@ namespace CairoChart {
}
protected virtual void draw_plarea_border () {
LineStyle().apply(this);
color = border_color;
ctx.set_dash(null, 0);
ctx.rectangle(plarea.x0, plarea.y0, plarea.width, plarea.height);
ctx.stroke ();
}
@ -413,9 +370,9 @@ namespace CairoChart {
title.show();
}
protected virtual void draw_axes () {
for (var si = series.length - 1, nskip = 0; si >= 0; --si)
for (var si = series.length - 1, nskip = 0; si >=0; --si)
series[si].axis_x.draw(ref nskip);
for (var si = series.length - 1, nskip = 0; si >= 0; --si)
for (var si = series.length - 1, nskip = 0; si >=0; --si)
series[si].axis_y.draw(ref nskip);
}
protected virtual void draw_series () {

View File

@ -60,11 +60,6 @@ namespace CairoChart {
*/
public Style style = Style();
/**
* Value label style.
*/
public LabelStyle label_style = new LabelStyle();
/**
* Has crossings.
*/
@ -87,7 +82,6 @@ namespace CairoChart {
c.active_cursor = active_cursor;
c.is_cursor_active = is_cursor_active;
c.style = style;
c.label_style = label_style.copy();
c.crossings = crossings;
return c;
}
@ -346,18 +340,9 @@ namespace CairoChart {
var show_time = ccs[ci].show_time;
var show_y = ccs[ci].show_y;
// value label background
chart.color = label_style.bg_color;
chart.color = chart.bg_color;
chart.ctx.rectangle (svp.x - size.x / 2, svp.y - size.y / 2, size.x, size.y);
chart.ctx.fill();
// value label frame
label_style.frame_style.apply(chart);
chart.ctx.move_to (svp.x - size.x / 2, svp.y - size.y / 2);
chart.ctx.rel_line_to (size.x, 0);
chart.ctx.rel_line_to (0, size.y);
chart.ctx.rel_line_to (-size.x, 0);
chart.ctx.rel_line_to (0, -size.y);
chart.ctx.stroke();
if (show_x) {
chart.color = s.axis_x.color;
@ -431,7 +416,7 @@ namespace CairoChart {
if (Math.vcross(s.scr_pnt(points[i]), s.scr_pnt(points[i+1]), rel2scr_x(c.x),
chart.plarea.y0, chart.plarea.y1, out y)) {
var point = Point128(s.axis_x.axis_val(rel2scr_x(c.x)), s.axis_y.axis_val(y));
Point size; bool show_x, show_date, show_time, show_y;
Point128 size; bool show_x, show_date, show_time, show_y;
cross_what_to_show(s, out show_x, out show_time, out show_date, out show_y);
calc_cross_sizes (s, point, out size, show_x, show_time, show_date, show_y);
Cross cc = {si, point, size, show_x, show_date, show_time, show_y};
@ -443,7 +428,7 @@ namespace CairoChart {
if (Math.hcross(s.scr_pnt(points[i]), s.scr_pnt(points[i+1]),
chart.plarea.x0, chart.plarea.x1, rel2scr_y(c.y), out x)) {
var point = Point128(s.axis_x.axis_val(x), s.axis_y.axis_val(rel2scr_y(c.y)));
Point size; bool show_x, show_date, show_time, show_y;
Point128 size; bool show_x, show_date, show_time, show_y;
cross_what_to_show(s, out show_x, out show_time, out show_date, out show_y);
calc_cross_sizes (s, point, out size, show_x, show_time, show_date, show_y);
Cross cc = {si, point, size, show_x, show_date, show_time, show_y};
@ -464,7 +449,7 @@ namespace CairoChart {
protected struct Cross {
uint series_index;
Point128 point;
Point size;
Point128 size;
bool show_x;
bool show_date;
bool show_time;
@ -493,90 +478,14 @@ namespace CairoChart {
return all_cursors;
}
protected virtual void scr2cell (int m, int n, Point p, out int i, out int j) {
i = (int)((p.x - chart.plarea.x0) / chart.plarea.width * m);
j = (int)((p.y - chart.plarea.y0) / chart.plarea.height * n);
}
protected virtual void cell2scr (int m, int n, int i, int j, out Point p) {
p = Point(chart.plarea.x0 + chart.plarea.width * (i + 0.5) / m,
chart.plarea.y0 + chart.plarea.height * (j + 0.5)/ n);
}
protected virtual void calc_cursors_value_positions () {
// 1. Find maximum width/height of cursors values.
var max_width = 1.0, max_height = 1.0;
for (var ccsi = 0, max_ccsi = crossings.length; ccsi < max_ccsi; ++ccsi) {
for (var cci = 0, max_cci = crossings[ccsi].crossings.length; cci < max_cci; ++cci) {
unowned Cross[] cr = crossings[ccsi].crossings;
max_width = double.max(max_width, cr[cci].size.x
+ 4 * double.max(chart.series[cr[cci].series_index].axis_x.font.hspacing,
chart.series[cr[cci].series_index].axis_y.font.hspacing));
max_height = double.max(max_height, cr[cci].size.y
+ 4 * double.max(chart.series[cr[cci].series_index].axis_x.font.vspacing,
chart.series[cr[cci].series_index].axis_y.font.vspacing));
}
}
// 2. Calculate 2D-array sizes.
var m = (int.max(1, (int)(chart.plarea.width / max_width))),
n = (int.max(1, (int)(chart.plarea.height / max_height)));
// 3. Create 2D-array of bool or links to cursors values.
var arr2d_e = new bool[m, n];
// 4. Set Busy/Cross Cells
for (var ccsi = 0, max_ccsi = crossings.length; ccsi < max_ccsi; ++ccsi) {
for (var cci = 0, max_cci = crossings[ccsi].crossings.length; cci < max_cci; ++cci) {
// TODO: Ticket #142: find smart algorithm of cursors values placements
unowned Cross[] cr = crossings[ccsi].crossings;
cr[cci].scr_point = chart.series[cr[cci].series_index].scr_pnt (cr[cci].point);
int i = 0, j = 0;
scr2cell(m, n, cr[cci].scr_point, out i, out j);
arr2d_e[i, j] = true;
}
}
// 5. Calculate positions.
for (var ccsi = 0, max_ccsi = crossings.length; ccsi < max_ccsi; ++ccsi) {
for (var cci = 0, max_cci = crossings[ccsi].crossings.length; cci < max_cci; ++cci) {
unowned Cross[] cr = crossings[ccsi].crossings;
int i = 0, j = 0;
scr2cell(m, n, cr[cci].scr_point, out i, out j);
for (var radius = 1; radius < int.max(m, n); ++radius) {
bool found = false;
// top, bottom
int[] ll = {int.max(0, j - radius), int.min(n - 1, j + radius)};
foreach (var l in ll) {
for (var k = int.max(0, i - radius); k <= int.min(m - 1, i + radius); ++k) {
if (k == i) continue;
if (!arr2d_e[k, l]) {
arr2d_e[k, l] = true;
cell2scr(m, n, k, l, out cr[cci].scr_value_point);
found = true;
break;
}
}
if (found) break;
}
if (found) break;
// left, right
int[] kk = {int.max(0, i - radius), int.min(m - 1, i + radius)};
foreach (var k in kk) {
for (var l = int.max(0, j - radius); l <= int.min(n - 1, j + radius); ++l) {
if (l == j) continue;
if (!arr2d_e[k, l]) {
arr2d_e[k, l] = true;
cell2scr(m, n, k, l, out cr[cci].scr_value_point);
found = true;
break;
}
}
if (found) break;
}
if (found) break;
}
var d_max = double.max (cr[cci].size.x / 1.5, cr[cci].size.y / 1.5);
cr[cci].scr_value_point = Point (cr[cci].scr_point.x + d_max, cr[cci].scr_point.y - d_max);
}
}
}
@ -609,12 +518,12 @@ namespace CairoChart {
}
}
protected virtual void calc_cross_sizes (Series s, Point128 p, out Point size,
protected virtual void calc_cross_sizes (Series s, Point128 p, out Point128 size,
bool show_x = false, bool show_time = false,
bool show_date = false, bool show_y = false) {
if (show_x == show_time == show_date == show_y == false)
cross_what_to_show(s, out show_x, out show_time, out show_date, out show_y);
size = Point ();
size = Point128 ();
string date, time;
s.axis_x.print_dt(p.x, out date, out time);
var date_t = new Text(chart, date, s.axis_x.font, s.axis_x.color);
@ -626,8 +535,8 @@ namespace CairoChart {
if (show_date) { size.x = date_t.width; h_x = date_t.height; }
if (show_time) { size.x = double.max(size.x, time_t.width); h_x += time_t.height; }
if (show_y) { size.x += y_t.width; h_y = y_t.height; }
if ((show_x || show_date || show_time) && show_y) size.x += s.axis_x.font.hspacing + s.axis_y.font.hspacing;
if (show_date && show_time) h_x += s.axis_x.font.vspacing;
if ((show_x || show_date || show_time) && show_y) size.x += double.max(s.axis_x.font.hspacing, s.axis_y.font.hspacing);
if (show_date && show_time) h_x += s.axis_x.font.hspacing;
size.y = double.max (h_x, h_y);
}
}

View File

@ -34,12 +34,12 @@ namespace CairoChart {
/**
* Vertical spacing.
*/
public double vspacing = 2;
public double vspacing = 4;
/**
* Horizontal spacing.
*/
public double hspacing = 2;
public double hspacing = 4;
/**
* Both vertical & horizontal spacing (set only).
@ -51,7 +51,7 @@ namespace CairoChart {
set {
vspacing = hspacing = value;
}
default = 2;
default = 4;
}
/**
@ -67,8 +67,8 @@ namespace CairoChart {
Cairo.FontSlant slant = Cairo.FontSlant.NORMAL,
Cairo.FontWeight weight = Cairo.FontWeight.NORMAL,
Gtk.Orientation orient = Gtk.Orientation.HORIZONTAL,
double vspacing = 2,
double hspacing = 2
double vspacing = 4,
double hspacing = 4
) {
this.family = family;
this.size = size;

View File

@ -1,46 +1,28 @@
namespace CairoChart {
/**
* ``Cursors`` values style.
* ``LabelStyle`` Style.
*/
public class LabelStyle {
/**
* Background color.
*/
public Color bg_color;
/**
* Frame line style.
*/
public LineStyle frame_style;
public struct LabelStyle {
/**
* Font style.
*/
public Font font;
Font font;
/**
* Constructs a new ``LabelStyle``.
* @param font font style.
* @param bg_color background color.
* @param frame_style frame line style.
* Frame line style.
*/
public LabelStyle (
Color bg_color = Color(1, 1, 1, 1),
LineStyle frame_style = LineStyle(Color(0, 0, 0, 0.1)),
Font font = new Font()
) {
this.bg_color = bg_color;
this.frame_style = frame_style;
this.font = font;
}
LineStyle frame_line_style;
/**
* Gets a copy of the ``LabelStyle``.
* Background color.
*/
public virtual LabelStyle copy () {
return new LabelStyle(bg_color, frame_style, font);
}
Color bg_color;
/**
* Frame/border color.
*/
Color frame_color;
}
}

View File

@ -180,8 +180,8 @@ namespace CairoChart {
switch (position) {
case Position.TOP:
case Position.BOTTOM:
var ser_title_width = line_length + s.title.width + s.title.font.hspacing * 2;
if (leg_width_sum + ser_title_width > chart.area.width) { // carry
var ser_title_width = s.title.width + line_length;
if (leg_width_sum + (leg_width_sum == 0 ? 0 : s.title.font.hspacing) + ser_title_width > chart.area.width) { // carry
leg_height_sum += max_font_h;
switch (process_type) {
case ProcessType.CALC:
@ -200,43 +200,43 @@ namespace CairoChart {
switch (process_type) {
case ProcessType.DRAW:
var x = legend_x0 + leg_width_sum + s.title.font.hspacing;
var y = legend_y0 + leg_height_sum + mfh[heights_idx] / 2;
var x = legend_x0 + leg_width_sum + (leg_width_sum == 0 ? 0 : s.title.font.hspacing);
var y = legend_y0 + leg_height_sum + mfh[heights_idx] / 2 + s.title.height / 2;
// series title
chart.ctx.move_to (x + line_length, y + s.title.height / 2);
chart.ctx.move_to (x + line_length, y);
chart.color = s.title.color;
s.title.show();
// series line style
chart.ctx.move_to (x, y);
chart.ctx.move_to (x, y - s.title.height / 2);
s.line_style.apply(chart);
chart.ctx.rel_line_to (line_length, 0);
chart.ctx.stroke();
s.marker.draw_at_pos (Point(x + line_length / 2, y));
s.marker.draw_at_pos (Point(x + line_length / 2, y - s.title.height / 2));
break;
}
switch (position) {
case Position.TOP:
case Position.BOTTOM:
var ser_title_width = line_length + s.title.width + s.title.font.hspacing * 2;
leg_width_sum += ser_title_width;
max_font_h = double.max (max_font_h, s.title.height + s.title.font.vspacing * 2);
var ser_title_width = s.title.width + line_length;
leg_width_sum += (leg_width_sum == 0 ? 0 : s.title.font.hspacing) + ser_title_width;
max_font_h = double.max (max_font_h, s.title.height) + (leg_height_sum != 0 ? s.title.font.vspacing : 0);
break;
case Position.LEFT:
case Position.RIGHT:
switch (process_type) {
case ProcessType.CALC:
mfh += s.title.height + s.title.font.vspacing * 2;
width = double.max (width, s.title.font.hspacing * 2 + line_length + s.title.width);
mfh += s.title.height + (leg_height_sum != 0 ? s.title.font.vspacing : 0);
width = double.max (width, s.title.width + line_length);
break;
case ProcessType.DRAW:
heights_idx++;
break;
}
leg_height_sum += s.title.height + s.title.font.vspacing * 2;
leg_height_sum += s.title.height + (leg_height_sum != 0 ? s.title.font.vspacing : 0);
break;
}
}
@ -261,10 +261,10 @@ namespace CairoChart {
case ProcessType.CALC:
height = leg_height_sum;
switch (position) {
case Position.TOP: chart.evarea.y0 += height + spacing; break;
case Position.BOTTOM: chart.evarea.y1 -= height + spacing; break;
case Position.LEFT: chart.evarea.x0 += width + spacing; break;
case Position.RIGHT: chart.evarea.x1 -= width + spacing; break;
case Position.TOP: chart.evarea.y0 += height; break;
case Position.BOTTOM: chart.evarea.y1 -= height; break;
case Position.LEFT: chart.evarea.x0 += width; break;
case Position.RIGHT: chart.evarea.x1 -= width; break;
}
break;
}

View File

@ -73,9 +73,10 @@ namespace CairoChart {
line_style.color = value;
axis_x.color = value;
axis_y.color = value;
axis_x.grid_style.color.red = axis_y.grid_style.color.red = value.red;
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;
axis_x.grid_style.color = value;
axis_x.grid_style.color.alpha = 0.5;
axis_y.grid_style.color = value;
axis_y.grid_style.color.alpha = 0.5;
}
default = Color (0, 0, 0, 1);
}

View File

@ -287,7 +287,6 @@ int main (string[] args) {
da.set_events ( Gdk.EventMask.BUTTON_PRESS_MASK
|Gdk.EventMask.BUTTON_RELEASE_MASK
|Gdk.EventMask.POINTER_MOTION_MASK
|Gdk.EventMask.SCROLL_MASK
);
var chart = chart1;
@ -572,18 +571,11 @@ int main (string[] args) {
return true; // return ret;
});
da.add_events(Gdk.EventMask.SCROLL_MASK);
da.scroll_event.connect((event) => {
switch (event.direction) {
case Gdk.ScrollDirection.UP:
chart.zoom_scroll_in(Point(event.x, event.y));
break;
case Gdk.ScrollDirection.DOWN:
chart.zoom_scroll_out(Point(event.x, event.y));
break;
}
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
//var ret = chart.scroll_notify_event(event);
return true; // return ret;
});