Commit 56e90b93 authored by Maxime Doyen's avatar Maxime Doyen

charts improvements + some bugfix

parent 8c47830e
......@@ -106,7 +106,9 @@ homebank_SOURCES = \
ui-transaction.c \
ui-transaction.h \
ui-widgets.c \
ui-widgets.h
ui-widgets.h \
gtk-chart-colors.c \
gtk-chart-colors.h
homebank_LDADD = $(DEPS_LIBS)
......
......@@ -79,7 +79,8 @@ am_homebank_OBJECTS = dsp_account.$(OBJEXT) dsp_mainwindow.$(OBJEXT) \
ui-assist-start.$(OBJEXT) ui-budget.$(OBJEXT) \
ui-category.$(OBJEXT) ui-dialogs.$(OBJEXT) ui-filter.$(OBJEXT) \
ui-hbfile.$(OBJEXT) ui-payee.$(OBJEXT) ui-pref.$(OBJEXT) \
ui-transaction.$(OBJEXT) ui-widgets.$(OBJEXT)
ui-transaction.$(OBJEXT) ui-widgets.$(OBJEXT) \
gtk-chart-colors.$(OBJEXT)
homebank_OBJECTS = $(am_homebank_OBJECTS)
am__DEPENDENCIES_1 =
homebank_DEPENDENCIES = $(am__DEPENDENCIES_1)
......@@ -109,6 +110,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
......@@ -126,6 +129,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
INSTALL = @INSTALL@
......@@ -133,6 +137,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
......@@ -148,7 +154,9 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
......@@ -162,6 +170,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......@@ -311,7 +323,9 @@ homebank_SOURCES = \
ui-transaction.c \
ui-transaction.h \
ui-widgets.c \
ui-widgets.h
ui-widgets.h \
gtk-chart-colors.c \
gtk-chart-colors.h
homebank_LDADD = $(DEPS_LIBS)
AM_CPPFLAGS = \
......@@ -404,6 +418,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsp_account.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsp_mainwindow.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk-chart-colors.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk-chart.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk-dateentry.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-account.Po@am__quote@
......
......@@ -985,7 +985,8 @@ gboolean file_clear = GPOINTER_TO_INT(user_data);
if(file_clear == TRUE)
{
ui_start_assistant();
//ui_start_assistant();
ui_mainwindow_action_help_welcome();
}
}
......@@ -1234,7 +1235,7 @@ next1:
hb_label_set_amount(GTK_LABEL(data->TX_topamount), total, GLOBALS->minor);
gtk_chart_set_color_scheme(GTK_CHART(data->RE_pie), PREFS->report_color_scheme);
gtk_chart_set_datas(GTK_CHART(data->RE_pie), model, LST_TOPSPEND_AMOUNT);
gtk_chart_set_datas(GTK_CHART(data->RE_pie), model, LST_TOPSPEND_AMOUNT, NULL);
//gtk_chart_show_legend(GTK_CHART(data->RE_pie), FALSE);
......
/* HomeBank -- Free, easy, personal accounting for everyone.
* Copyright (C) 1995-2013 Maxime DOYEN
*
* This file is part of HomeBank.
*
* HomeBank is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HomeBank is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gtk/gtk.h>
#include "gtk-chart-colors.h"
char *chart_colors[] =
{
"HomeBank",
"Money",
"SAP",
"Quicken",
"Office 2010",
"Office 2013",
"Analytics",
NULL
};
struct rgbcol money_colors[] =
{
{ 255, 193, 96 },
{ 92, 131, 180 },
{ 165, 88, 124 },
{ 108, 124, 101 },
{ 230, 121, 99 },
{ 91, 160, 154 },
{ 207, 93, 96 },
{ 70, 136, 106 },
{ 245, 163, 97 },
{ 158, 153, 88 },
{ 255, 140, 90 },
{ 122, 151, 173 },
{ 84, 142, 128 },
{ 185, 201, 149 },
{ 165, 99, 103 },
{ 77, 140, 172 },
{ 251, 228, 128 },
{ 73, 99, 149 },
{ 192, 80, 77 },
{ 139, 180, 103 },
{ 132, 165, 214 },
{ 221, 216, 115 },
{ 77, 103, 137 },
{ 165, 181, 156 },
};
int money_nbcolors = G_N_ELEMENTS(money_colors);
struct rgbcol quicken_colors[] =
{
{ 226, 73, 13 },
{ 223, 180, 6 },
{ 124, 179, 0 },
{ 44, 108, 182 },
{ 184, 81, 186 },
{ 165, 165, 165 },
{ 122, 122, 122 },
{ 137, 42, 40 },
{ 70, 161, 100 },
{ 220, 106, 0 },
{ 113, 113, 113 }, // others
};
int quicken_nbcolors = G_N_ELEMENTS(quicken_colors);
struct rgbcol analytics_colors[] =
{
{ 5, 141, 199 }, //line color
{ 80, 180, 50 },
{ 237, 86, 27 },
{ 237, 239, 0 },
{ 36, 203, 229 },
{ 100, 229, 114 },
{ 255, 150, 85 },
{ 255, 242, 99 },
{ 106, 249, 196 },
{ 178, 222, 255 },
{ 204, 204, 204 }, // others
};
int analytics_nbcolors = G_N_ELEMENTS(analytics_colors);
struct rgbcol office2010_colors[] =
{
{ 60, 100, 149 },
{ 150, 60, 59 },
{ 120, 147, 68 },
{ 99, 75, 123 },
{ 61, 133, 157 },
{ 196, 115, 49 },
{ 73, 120, 176 },
{ 179, 74, 71 },
{ 144, 178, 84 },
{ 117, 93, 153 },
{ 73, 161, 185 },
{ 232, 140, 65 },
{ 126, 155, 199 },
{ 202, 126, 126 },
{ 174, 197, 129 },
{ 156, 137, 182 },
{ 123, 185, 206 },
{ 248, 170, 121 },
};
int office2010_nbcolors = G_N_ELEMENTS(office2010_colors);
struct rgbcol office2013_colors[] =
{
{ 91, 155, 213 },
{ 237, 125, 49 },
{ 165, 165, 165 },
{ 255, 192, 0 },
{ 68, 114, 196 },
{ 112, 173, 71 },
{ 37, 94, 145 },
{ 158, 72, 14 },
{ 99, 99, 99 },
{ 153, 115, 0 },
{ 38, 68, 120 },
{ 67, 104, 43 },
{ 124, 175, 221 },
{ 241, 151, 90 },
{ 183, 183, 183 },
{ 255, 205, 51 },
{ 105, 142, 208 },
{ 140, 193, 104 },
};
int office2013_nbcolors = G_N_ELEMENTS(office2013_colors);
struct rgbcol sap_colors[] =
{
{ 107, 148, 181 },
{ 239, 205, 120 },
{ 160, 117, 146 },
{ 107, 181, 144 },
{ 237, 164, 112 },
{ 107, 106, 161 },
{ 183, 213, 104 },
{ 214, 128, 118 },
{ 135, 115, 161 },
{ 218, 217, 86 },
{ 207, 111, 122 },
{ 85, 168, 161 },
{ 253, 213, 65 },
{ 146, 98, 148 },
{ 115, 192, 59 },
{ 205, 81, 96 },
{ 53, 180, 201 },
{ 248, 175, 103 },
{ 186, 97, 125 },
{ 117, 202, 249 },
{ 244, 131, 35 },
{ 178, 45, 110 },
{ 87, 229, 151 },
{ 204, 171, 68 },
{ 172, 110, 145 },
{ 61, 132, 137 },
{ 224, 117, 79 },
{ 117, 84, 148 },
{ 155, 206, 158 },
{ 255, 133, 100 },
{ 60, 98, 153 },
{ 128, 197, 122 },
};
int sap_nbcolors = G_N_ELEMENTS(sap_colors);
struct rgbcol homebank_colors[] =
{
{ 72, 118, 176 },
{ 180, 198, 230 },
{ 227, 126, 35 },
{ 238, 186, 123 },
{ 97, 158, 58 },
{ 175, 222, 142 },
{ 184, 43, 44 },
{ 231, 151, 149 },
{ 136, 103, 185 },
{ 190, 174, 210 },
{ 127, 87, 77 },
{ 184, 155, 147 },
{ 202, 118, 190 },
{ 230, 181, 208 },
{ 126, 126, 126 },
{ 198, 198, 198 },
{ 187, 188, 56 },
{ 218, 218, 144 },
{ 109, 189, 205 },
{ 176, 217, 228 },
{ 237, 212, 0 },
{ 255, 239, 101 },
{ 207, 93, 96 },
{ 234, 186, 187 },
{ 193, 124, 17 },
{ 240, 181, 90 },
{ 186, 189, 182 },
{ 225, 227, 223 },
{ 115, 210, 22 },
{ 175, 240, 112 },
{ 255, 140, 90 },
{ 255, 191, 165 },
};
int homebank_nbcolors = G_N_ELEMENTS(homebank_colors);
struct rgbcol global_colors[] =
{
{ 0, 0, 0}, // black
{255, 255, 255}, // white
{239, 239, 239}, // intermediate lines
{ 68, 68, 68}, // text
{ 51, 51, 51}, // x/y axis
};
/*
struct rgbcol global_colors[] =
{
{ 0, 0, 0}, // black
{255, 255, 255}, // white
{238, 238, 238}, // #top/bottom lines
{204, 204, 204}, // #dotted lines
{102, 102, 102}, // #x-axis, scale text
{153, 153, 153}, // # ??
{ 0, 119, 204}, // #line color
//new
{239, 239, 239}, // intermediate lines
{ 68, 68, 68}, // text
{ 51, 51, 51}, // x/y axis
};*/
void cairo_user_set_rgbcol(cairo_t *cr, struct rgbcol *col)
{
cairo_set_source_rgb(cr, COLTOCAIRO(col->r), COLTOCAIRO(col->g), COLTOCAIRO(col->b));
}
void cairo_user_set_rgbacol(cairo_t *cr, struct rgbcol *col, double alpha)
{
cairo_set_source_rgba(cr, COLTOCAIRO(col->r), COLTOCAIRO(col->g), COLTOCAIRO(col->b), alpha);
}
void cairo_user_set_rgbcol_over(cairo_t *cr, struct rgbcol *col, gboolean over)
{
if( over )
cairo_set_source_rgb(cr, COLTOCAIROOVER(col->r), COLTOCAIROOVER(col->g), COLTOCAIROOVER(col->b));
else
cairo_set_source_rgb(cr, COLTOCAIRO(col->r), COLTOCAIRO(col->g), COLTOCAIRO(col->b));
}
/* HomeBank -- Free, easy, personal accounting for everyone.
* Copyright (C) 1995-2013 Maxime DOYEN
*
* This file is part of HomeBank.
*
* HomeBank is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HomeBank is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_COLORS_H__
#define __GTK_COLORS_H__
#define MASKCOL 255
#define COLTO16(col8) ( (col8 | col8<<8 ) )
#define COLTOOVER(col8) ( (col8 + MASKCOL) / 2 )
#define OVER_ALPHA .33
#define OVER_COLOR (MASKCOL * OVER_ALPHA)
#define COLTOCAIRO(col8) ( (col8 / 255.0) )
#define COLTOCAIROOVER(col8) ( ((col8 * (1 - OVER_ALPHA)) + OVER_COLOR ) / 255.0 )
/* new stuff */
#define CHART_FONT_SIZE_NORMAL 10
#define CHART_FONT_SIZE_TITLE 16
#define CHART_FONT_SIZE_PERIOD 12
//typedef struct _rgbcol RgbCol;
struct rgbcol
{
guint8 r, g, b;
};
enum {
BLACK,
WHITE,
GREY1,
TEXT,
XYLINES
};
enum colmap
{
CHART_COLMAP_HOMEBANK,
CHART_COLMAP_MSMONEY,
CHART_COLMAP_SAP,
CHART_COLMAP_QUICKEN,
CHART_COLMAP_OFFICE2010,
CHART_COLMAP_OFFICE2013,
CHART_COLMAP_ANALYTICS,
};
extern char *chart_colors[];
extern struct rgbcol global_colors[];
extern struct rgbcol money_colors[];
extern struct rgbcol quicken_colors[];
extern struct rgbcol analytics_colors[];
extern struct rgbcol office2010_colors[];
extern struct rgbcol office2013_colors[];
extern struct rgbcol sap_colors[];
extern struct rgbcol homebank_colors[];
extern int money_nbcolors;
extern int quicken_nbcolors;
extern int analytics_nbcolors;
extern int office2010_nbcolors;
extern int office2013_nbcolors;
extern int sap_nbcolors;
extern int homebank_nbcolors;
void cairo_user_set_rgbcol(cairo_t *cr, struct rgbcol *col);
void cairo_user_set_rgbacol(cairo_t *cr, struct rgbcol *col, double alpha);
void cairo_user_set_rgbcol_over(cairo_t *cr, struct rgbcol *col, gboolean over);
#endif /* __GTK_COLORS_H__ */
\ No newline at end of file
This diff is collapsed.
......@@ -51,12 +51,32 @@ enum
};
/* default zoomx for charts */
#define GTK_CHART_MINBARW 8
#define GTK_CHART_BARW 24
#define GTK_CHART_MINBARW 8
#define GTK_CHART_MAXBARW 64
#define CHART_BUFFER_LENGTH 128
#define NUM_COLORMAP_MAX 24
#define DEFAULT_DELAY 500 /* Default delay in ms */
// for cairo pie
#define PIE_LINE_SLICE 0
#define SOFT_LIGHT 0
#define GRADIENT 0
#define CHART_PIE_DONUT 0
/* new stuff */
#define MARGIN 8
//#define PROP_SHOW_MINOR 6
//#define PROP_SHOW_LEGEND 7
/* end */
enum
{
......@@ -68,16 +88,6 @@ enum
NUM_LST_LEGEND
};
enum
{
CHART_COLMAP_MSMONEY,
CHART_COLMAP_QUICKEN,
CHART_COLMAP_ANALYTICS,
CHART_COLMAP_OFFICE2010
};
/* you should access only the entry and list fields directly */
struct _GtkChart
......@@ -86,47 +96,47 @@ struct _GtkChart
GtkHBox hbox;
GtkWidget *drawarea;
GtkWidget *treeview;
GtkTreeModel *legend;
GtkAdjustment *adjustment;
GtkWidget *scrollbar;
GtkWidget *scrollwin;
gint type;
guint32 kcur; //currency key
gboolean minor;
gboolean show_over;
gboolean show_xval;
gint decy_xval;
gdouble minor_rate;
gchar *minor_symbol;
GtkWidget *scrollwin;
GtkWidget *treeview;
GtkTreeModel *legend;
GtkTreeModel *model;
GtkWidget *tooltipwin;
GtkWidget *tttitle;
GtkWidget *ttlabel;
GdkColor normal_colors[NUM_COLORMAP_MAX];
GdkColor over_colors[NUM_COLORMAP_MAX];
/* data storage */
guint entries;
gchar *title;
gint *id;
gchar **titles;
gdouble *datas1;
gdouble *datas2;
/* chart properties */
gint type;
gboolean dual;
/*gint test;*/
gboolean show_over;
gboolean show_xval;
gint decy_xval;
//guint32 kcur;
gboolean minor;
gdouble minor_rate;
gchar *minor_symbol;
/* color datas */
struct rgbcol *colors;
gint nb_cols;
gint cs_red, cs_green, cs_blue;
gint nb_colors;
double l, t, b, r, w, h;
/* our drawing rectangle with margin */
double legend_w;
/* zones height */
double title_zh;
double ox, oy;
gint lastx, lasty, lastactive;
......@@ -141,12 +151,12 @@ struct _GtkChart
/* bar specifics */
double range, min, max, unit, minimum;
gint div;
gint visible;
gint visible;
double font_h;
double graph_width, graph_height; //graph dimension
double barw, posbarh, negbarh;
double graph_x, graph_y, graph_width, graph_height; //graph dimension
double barw, blkw, posbarh, negbarh;
gchar buffer[CHART_BUFFER_LENGTH];
};
......@@ -169,13 +179,11 @@ GtkWidget *gtk_chart_new(gint type);
void gtk_chart_set_type(GtkChart *chart, gint type);
void gtk_chart_set_color_scheme(GtkChart * chart, gint colorscheme);
void gtk_chart_set_datas(GtkChart *chart, GtkTreeModel *model, guint column);
void gtk_chart_set_dualdatas(GtkChart *chart, GtkTreeModel *model, guint column1, guint column2);
void gtk_chart_set_title(GtkChart * chart, gchar *title);
void gtk_chart_set_datas(GtkChart *chart, GtkTreeModel *model, guint column, gchar *title);
void gtk_chart_set_dualdatas(GtkChart *chart, GtkTreeModel *model, guint column1, guint column2, gchar *title);
void gtk_chart_set_minor_prefs(GtkChart * chart, gdouble rate, gchar *symbol);
void gtk_chart_set_currency(GtkChart * chart, guint32 kcur);
//void gtk_chart_set_currency(GtkChart * chart, guint32 kcur);
void gtk_chart_set_overdrawn(GtkChart * chart, gdouble minimum);
void gtk_chart_set_decy_xval(GtkChart * chart, gint decay);
......
......@@ -20,7 +20,7 @@
#include "homebank.h"
#include "hb-preferences.h"
#include "hb-filter.h"
#include "gtk-chart.h"
#include "gtk-chart-colors.h"
#ifdef G_OS_WIN32
#include <windows.h>
......@@ -318,7 +318,7 @@ gint i;
PREFS->stat_showdetail = FALSE;
PREFS->stat_showrate = FALSE;
PREFS->budg_showdetail = FALSE;
PREFS->report_color_scheme = CHART_COLMAP_MSMONEY;
PREFS->report_color_scheme = CHART_COLMAP_HOMEBANK;
PREFS->chart_legend = FALSE;
......
......@@ -705,7 +705,7 @@ Account *acc;
/* update bar chart */
//DB( g_print(" set bar to %d\n\n", LST_STAT_EXPENSE+tmpkind) );
gtk_chart_set_datas(GTK_CHART(data->RE_line), model, LST_OVER_BALANCE);
gtk_chart_set_datas(GTK_CHART(data->RE_line), model, LST_OVER_BALANCE, NULL);
//gtk_chart_set_line_datas(GTK_CHART(data->RE_line), model, LST_OVER_BALANCE, LST_OVER_DATE);
//repbalance_busy(data->window, FALSE);
......
......@@ -853,13 +853,9 @@ next1:
gtk_chart_set_color_scheme(GTK_CHART(data->RE_bar), PREFS->report_color_scheme);
if( tmpview == 0 )
gtk_chart_set_dualdatas(GTK_CHART(data->RE_bar), model, LST_BUDGET_SPENT, LST_BUDGET_BUDGET);
gtk_chart_set_dualdatas(GTK_CHART(data->RE_bar), model, LST_BUDGET_SPENT, LST_BUDGET_BUDGET, _(CYA_BUDGETSELECT[tmpview]));
else
gtk_chart_set_datas(GTK_CHART(data->RE_bar), model, column);
gtk_chart_set_title(GTK_CHART(data->RE_bar), _(CYA_BUDGETSELECT[tmpview]));
gtk_chart_set_datas(GTK_CHART(data->RE_bar), model, column, _(CYA_BUDGETSELECT[tmpview]));
}
......
......@@ -641,6 +641,7 @@ gboolean byamount;
GtkTreeModel *model;
gint page, tmpfor, tmpkind, column;
gboolean xval;
gchar *title;
DB( g_print("(statistic) update\n") );
......@@ -683,13 +684,15 @@ gboolean xval;
gtk_chart_set_color_scheme(GTK_CHART(data->RE_bar), PREFS->report_color_scheme);
gtk_chart_set_color_scheme(GTK_CHART(data->RE_pie), PREFS->report_color_scheme);
/* set chart title */
title = g_strdup_printf("%s - %s", _(CYA_STATSELECT[tmpfor]), _(CYA_KIND2[tmpkind]) );
/* update bar chart */
DB( g_print(" set bar to %d %s\n\n", column, _(CYA_KIND2[tmpkind])) );
if( tmpkind == 0 )
gtk_chart_set_dualdatas(GTK_CHART(data->RE_bar), model, LST_STAT_EXPENSE, LST_STAT_INCOME);
gtk_chart_set_dualdatas(GTK_CHART(data->RE_bar), model, LST_STAT_EXPENSE, LST_STAT_INCOME, title);
else
gtk_chart_set_datas(GTK_CHART(data->RE_bar), model, column);
gtk_chart_set_title(GTK_CHART(data->RE_bar), _(CYA_KIND2[tmpkind]));
gtk_chart_set_datas(GTK_CHART(data->RE_bar), model, column, title);
/* show xval for month/year and no by amount display */
......@@ -719,11 +722,12 @@ gboolean xval;
DB( g_print(" set pie to %d %s\n\n", column, _(CYA_KIND2[tmpkind])) );
if( tmpkind != 0 )
gtk_chart_set_datas(GTK_CHART(data->RE_pie), model, column);
gtk_chart_set_datas(GTK_CHART(data->RE_pie), model, column, title);
else
gtk_chart_set_datas(GTK_CHART(data->RE_pie), NULL, 0);
gtk_chart_set_title(GTK_CHART(data->RE_pie), _(CYA_KIND2[tmpkind]));
gtk_chart_set_datas(GTK_CHART(data->RE_pie), NULL, 0, NULL);
g_free(title);
}
static void statistic_update_daterange(GtkWidget *widget, gpointer user_data)
......
......@@ -646,12 +646,9 @@ gint page, tmpfor, tmpslice, column;
}
//gtk_chart_show_xval(GTK_CHART(data->RE_bar), xval);
gtk_chart_set_datas(GTK_CHART(data->RE_line), model, LST_STAT_AMOUNT);
gtk_chart_show_legend(GTK_CHART(data->RE_line), FALSE);
gtk_chart_show_xval(GTK_CHART(data->RE_line), TRUE);
gtk_chart_set_datas(GTK_CHART(data->RE_line), model, LST_STAT_AMOUNT, NULL);
gtk_chart_show_legend(GTK_CHART(data->RE_line), FALSE);
gtk_chart_show_xval(GTK_CHART(data->RE_line), TRUE);
}
......
......@@ -333,28 +333,27 @@ Archive *item;
}