$vo_new_chart->set_chart_y_grid_lines($_POST[$wpbi_settings['parameter']['ch-y-grid-step']]); $vo_new_chart->set_chart_y_labels_color($_POST[$wpbi_settings['parameter']['ch-y-label-color']]); $vo_new_chart->set_chart_y_labels_size($_POST[$wpbi_settings['parameter']['ch-y-label-size']]); $vo_new_chart->set_chart_y_labels_rotation($_POST[$wpbi_settings['parameter']['ch-y-label-rotation']]); $vo_new_chart->set_chart_y_legend($_POST[$wpbi_settings['parameter']['ch-y-legend']]); $vo_new_chart->set_chart_y_legend_color($_POST[$wpbi_settings['parameter']['ch-y-legend-color']]); $vo_new_chart->set_chart_y_legend_size($_POST[$wpbi_settings['parameter']['ch-y-legend-size']]); $vo_old_chart = new vo_chart(NULL); $vo_old_chart->set_chart_id($_POST[$wpbi_settings['parameter']['ch-id']]); $dao_chart = new dao_chart($wpdb, $wpbi_sql['tname']['charts']); $dao_chart->edit($vo_old_chart, $vo_new_chart); //Drop cols metadata $selected_charts = $_POST[$wpbi_settings['parameter']['ch-id']]; $vo_ch_cols = new vo_ch_cols(NULL, $selected_charts, NULL, NULL, NULL, NULL); $dao_ch_cols = new dao_ch_cols($wpdb, $wpbi_sql['tname']['chart-cols']); $dao_ch_cols->del($vo_ch_cols); //insert columns metadata for ($col_idx = 0; $col_idx < sizeof($_POST[$wpbi_settings['parameter']['ch-tx-column-tf']]); $col_idx++) { $vo_ch_cols = new vo_ch_cols(); $vo_ch_cols->set_id(NULL); $vo_ch_cols->set_ch_id($_POST[$wpbi_settings['parameter']['ch-id']]); $vo_ch_cols->set_col_label($_POST[$wpbi_settings['parameter']['ch-tx-column-tf']][$col_idx]); $vo_ch_cols->set_col_color($_POST['picker_column'][$col_idx]); $vo_ch_cols->set_is_label(in_array($col_idx, $_POST[$wpbi_settings['parameter']['ch-x-column-cb']]) ? 1 : 0); $vo_ch_cols->set_is_value(in_array($col_idx, $_POST[$wpbi_settings['parameter']['ch-v-column-cb']]) ? 1 : 0); $vo_ch_cols->set_is_time(in_array($col_idx, $_POST[$wpbi_settings['parameter']['ch-istime-column-cb']]) ? 1 : 0); $dao_ch_cols = new dao_ch_cols($wpdb, $wpbi_sql['tname']['chart-cols']); $dao_ch_cols->add($vo_ch_cols); } } ?>