Sha256: 9c1c363139f320de595c6089e59cbaacbc9e03afe4156230cb8f81875d44d506

Contents?: true

Size: 914 Bytes

Versions: 2

Compression:

Stored size: 914 Bytes

Contents

module Asposeslidesjava
  module SetLabelDistance
    def initialize()
        data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
                
        # Instantiate Presentation class that represents the presentation file
        pres = Rjb::import('com.aspose.slides.Presentation').new

        # Access first slide
        sld = pres.getSlides().get_Item(0)

        # Adding a chart on slide
        ch = sld.getShapes().addChart(Rjb::import('com.aspose.slides.ChartType').ClusteredColumn, 20, 20, 500, 300)
        
        # Setting the position of label from axis
        ch.getAxes().getHorizontalAxis().setLabelOffset(500)

        # Saving the presentation
        pres.save(data_dir + "Position.pptx", Rjb::import('com.aspose.slides.SaveFormat').Pptx)

        puts "Set label distance, please check the output file."
    end    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
asposeslidesjava-0.0.2 lib/asposeslidesjava/Charts/setlabeldistance.rb
asposeslidesjava-0.0.1 lib/asposeslidesjava/Charts/setlabeldistance.rb