From 4d9f2e62c911e5e7ce57491f79f44a9081376950 Mon Sep 17 00:00:00 2001 From: areza-blocpower Date: Mon, 10 Apr 2017 13:11:33 -0400 Subject: [PATCH] Added misc formatting changes to bring code up to date with standalone including axis and legend colors --- bpeng/reports/cbra_diag.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bpeng/reports/cbra_diag.py b/bpeng/reports/cbra_diag.py index 6348315..359c180 100644 --- a/bpeng/reports/cbra_diag.py +++ b/bpeng/reports/cbra_diag.py @@ -175,7 +175,7 @@ class CbraDiagnostic: # pre+post-retrofit, ECM table w/ names, savings for elec and gas, and total savings # Slide 4: Utility breakdown (chart is in bottom right corner) - utilityProjectionSlide = prs.slides[3] + utility_projection_slide = prs.slides[3] # Define stacked bar chart data util_cat = ["Existing", "Projected"] @@ -197,7 +197,7 @@ class CbraDiagnostic: # Set chart location and formatting chart_horz_pos, chart_vert_pos = Inches(0.05), Inches(2.4) chart_width, chart_height = Inches(3.5), Inches(2.5) - util_break_chart = utilityProjectionSlide.shapes.add_chart(XL_CHART_TYPE.COLUMN_STACKED, + util_break_chart = utility_projection_slide.shapes.add_chart(XL_CHART_TYPE.COLUMN_STACKED, chart_horz_pos, chart_vert_pos, chart_width, chart_height, util_break_data).chart @@ -215,17 +215,19 @@ class CbraDiagnostic: util_labels = util_break_chart.plots[0].data_labels util_labels.number_format = '$0' util_labels.font.size = Pt(8) + util_labels.font.color.rgb = RGBColor(0xff, 0xff, 0xff) # Axis util_break_chart.has_axis = True util_break_chart.has_axis_title = True util_break_chart.category_axis.tick_labels.font.size = Pt(11) + util_break_chart.category_axis.tick_labels.fontcolor.rgb = RGBColor(0xff, 0xff, 0xff) util_break_chart.value_axis.has_major_gridlines = False util_break_chart.value_axis.tick_label_position = XL_TICK_LABEL_POSITION.NONE # Create ECM summary table ecm_count = input_values.str.contains('Y').sum() - ecm_table = utilityProjectionSlide.shapes.add_table(ecm_count+2, 3, Inches(3.81), + ecm_table = utility_projection_slide.shapes.add_table(ecm_count+2, 3, Inches(3.81), Inches(0.25), Inches(5.83), Inches(3.76)) ecm_table.last_row = True -- GitLab