Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Creating a Pie Chart
  FAQ FAQ  Forum Search   Register Register  Login Login

Creating a Pie Chart

 Post Reply Post Reply
Author
Message
bob View Drop Down
Beginner
Beginner
Avatar

Joined: 21 Dec 15
Location: United States
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote bob Quote  Post ReplyReply Direct Link To This Post Topic: Creating a Pie Chart
    Posted: 21 Dec 15 at 6:40PM
I've tried using the Search to find code to produce a pie chart. I'm a trial user trying to see if this is the right tool for me.

I've completed the Hello-World example in VB6 and PowerBasic without issues. Also, I've played with lines, loading graphics, bar codes and text (although TrueType fonts were ignored).

Thanks

Bob
Back to Top
bob View Drop Down
Beginner
Beginner
Avatar

Joined: 21 Dec 15
Location: United States
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote bob Quote  Post ReplyReply Direct Link To This Post Posted: 24 Dec 15 at 12:33PM
I've tried the following code using DrawArc to create to slices of a pie chart.
  DIM iInstanceID AS LONG,  dXPos AS DOUBLE,  dYPos AS DOUBLE
  DIM dRadius AS DOUBLE,  dStartAngle AS DOUBLE
  DIM dEndAngle AS DOUBLE,  iPie AS LONG
  DIM iDrawOptions AS LONG, dRed AS DOUBLE, dgreen AS DOUBLE, dblue AS DOUBLE
  dXPos = 6
  dYPos = 6
  dRadius = 1
  dStartAngle = 0
  dEndAngle = 90
  iPie = 1
  iDrawOptions = 1
  dRed = 255
  dGreen = 0
  dBlue  = 128
  Result& = DPLSetFillColor(LibInstance&, BYVAL dRed, BYVAL dGreen, BYVAL dBlue)
  Result& = DPLDrawArc(LibInstance&,BYVAL dXPos,BYVAL dYPos,BYVAL dRadius,BYVAL dStartAngle,BYVAL dEndAngle,BYVAL iPie,BYVAL iDrawOptions)
  Result& = DPLClosePath(LibInstance&)
  dRed = 255
  dGreen = 0
  dBlue = 0
  Result& = DPLSetFillColor(LibInstance&,BYVAL dRed,BYVAL dGreen,BYVAL dBlue)
  Result& = DPLDrawArc(LibInstance&,BYVAL dXPos,BYVAL dYPos,BYVAL dRadius,BYVAL dStartAngle,BYVAL dEndAngle,BYVAL iPie,BYVAL iDrawOptions)
  Result& = DPLClosePath(LibInstance&)
  dStartAngle = 90
  dEndAngle = 270
  Result& = DPLDrawArc(LibInstance&,BYVAL dXPos,BYVAL dYPos,BYVAL dRadius,BYVAL dStartAngle,BYVAL dEndAngle,BYVAL iPie,BYVAL iDrawOptions)


The entire pie chart ends up red instead of purple and red.  Hope someone can help.

Bob
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store