8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/asposeslidesjava/Charts/chartseries.rb', line 8
def add_overlap_for_chart()
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
pres = Rjb::import('com.aspose.slides.Presentation').new
chart = pres.getSlides().get_Item(0).getShapes().addChart(Rjb::import('com.aspose.slides.ChartType').ClusteredColumn, 50, 50, 600, 400, true)
series = chart.getChartData().getSeries()
if series.get_Item(0).getOverlap() == 0
series.get_Item(0).getParentSeriesGroup().setOverlap(-30)
end
pres.save(data_dir + "Overlap.pptx", Rjb::import('com.aspose.slides.SaveFormat').Pptx)
puts "Added chart series overlap for charts, please check the output file."
end
|