OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Modifying charts for printing

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets
View previous topic :: View next topic  
Author Message
KenSmith
General User
General User


Joined: 04 Nov 2005
Posts: 23
Location: Sanfransisco bay area

PostPosted: Fri Mar 31, 2006 11:41 am    Post subject: Modifying charts for printing Reply with quote

I never seem to be able to get the "data series" line without a great deal of frantic clicking. Here is how I turn charts into black and white for printing.

Code:

Sub ModifyXYCharts
  dim TheSheet
  dim TheChart
  dim TheDiagram
  dim TheLineProp
 
  dim SheetNo as integer
  dim CharNo as integer
  dim LineNo as integer
     
  rem GlobalScope.BasicLibraries.LoadLibrary("XrayTool")
 
  for SheetNo = 0 to ThisComponent.Sheets.Count - 1
    TheSheet = ThisComponent.sheets.getbyIndex(SheetNo)
    if TheSheet.Charts.Count > 0 then
      for ChartNo = 0 to TheSheet.Charts.Count-1
   
        TheChart = TheSheet.Charts.getbyindex(ChartNo)
   
        TheEmbedded = TheChart.EmbeddedObject
 
        rem TheEmbedded.Title.String = "New Title"
 
        rem TheEmbedded.HasSubTitle = True
        rem TheEmbedded.SubTitle.String ="New sub title"

        TheDiagram = TheEmbedded.Diagram
        TheDiagram.Wall.FillColor = rgb(255,255,255)
        rem This is a mickey mouse what to get how many
        for LineNo = 1 to uBound(TheEmbedded.TranslatedColumns)
     

          TheLineProp = TheDiagram.GetDataRowProperties(LineNo)
          TheLineProp.SetPropertyValue("LineColor",rgb(0,0,0))
          next LineNo
        next ChartNo
      end if
    next SheetNo
  end sub


_________________
I'm new here
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group