Module: PredictabilityEngine::ExcelExporter

Defined in:
lib/predictability_engine/excel_exporter.rb

Constant Summary collapse

CAPTURE_WIDTH =
1920
CAPTURE_HEIGHT =
1080
CHART_SCALE =

deviceScaleFactor: PNG is 2× logical size → crisp on HiDPI/4K screens

2

Class Method Summary collapse

Class Method Details

.generate(items, images_path: nil) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/predictability_engine/excel_exporter.rb', line 12

def self.generate(items, images_path: nil)
  Axlsx::Package.new do |p|
    add_work_items_sheet(p.workbook, items)
    add_chart_sheets(p.workbook, images_path) if images_path
    return p.to_stream.read
  end
end