Lyle Fairfield wrote:
polite person wrote:
On Wed, 12 Jul 2006 18:55:54 GMT, polite person <sn**@snippers.comwrote:
>I posted a reply to his scatter chart problem over 24 hours ago and still he hasn't replied!
>
Well,nobody understood my post either.
Actually I was the only one who actually DID anything but I should have known better.
Geez! Not only do I know nothing about Scatter Charts but now I learn
that I know nothing about a post about a poster of a post about a post
about a scatter chart.
Ha! But that's only two strikes by my count Casey. You've still got
time...for another strike!!
>
muttering ...
"Oh, somewhere in this favored land the sun is shining bright.
The band is playing somewhere, and somewhere hearts are light.
And, somewhere men are laughing, and little children shout,
but there is no joy in Mudville --
mighty Casey has struck out."
It's interesting that words like 'playing,' 'children,' and 'mighty'
caused the Google Sponsored links all to go to Mighty World toys.
I'll try to find time this week to work on a PDF scatter chart mdb.
Any requests for features DFS? I care.
I'm thinking about small red circles with a black border for that
points. PDF has to use Bezier Curves for circles so I'm thinking along
these lines:
'PDF commands to draw a circle in a given color with the option to fill
in a color-----
Public Function DrawCircle(ByVal dblCenterX As Double, ByVal dblCenterY
As Double, ByVal dblRadius As Double, ByVal dblR As Double, dblG As
Double, dblB As Double, ByVal dblLineWidth, ByVal boolFill As Boolean,
Optional ByVal dblFillR As Double, Optional ByVal dblFillG As Double,
Optional ByVal dblFillB As Double) As String
Dim strTemp As String
Dim strCR As String
Const CRatio = 0.55228475
DrawCircle = ""
If boolFill Then
If IsMissing(dblFillR) Or IsMissing(dblFillG) Or IsMissing(dblFillB)
Then
MsgBox ("Fill color values are required.")
Exit Function
ElseIf Abs(dblFillR - 0.5) 0.5 Or Abs(dblFillG - 0.5) 0.5 Or
Abs(dblFillB - 0.5) 0.5 Then
MsgBox ("Fill color values must be between 0 and 1.")
Exit Function
End If
End If
strCR = Chr(13)
strTemp = "q" & strCR
strTemp = strTemp & CStr(dblLineWidth) & " w" & strCR
If boolFill Then
strTemp = strTemp & CStr(dblFillR) & " " & CStr(dblFillG) & " " &
CStr(dblFillB) & " rg" & strCR
End If
strTemp = strTemp & CStr(dblR) & " " & CStr(dblG) & " " & CStr(dblB) &
" RG" & strCR
strTemp = strTemp & CStr(dblCenterX + dblRadius) & " " &
CStr(dblCenterY) & " m" & strCR
strTemp = strTemp & CStr(dblCenterX + dblRadius) & " " &
CStr(dblCenterY + CRatio * dblRadius) & " " & CStr(dblCenterX + CRatio
* dblRadius) & " " & CStr(dblCenterY + dblRadius) & " " &
CStr(dblCenterX) & " " & CStr(dblCenterY + dblRadius) & " c" & strCR
strTemp = strTemp & CStr(dblCenterX - CRatio * dblRadius) & " " &
CStr(dblCenterY + dblRadius) & " " & CStr(dblCenterX - dblRadius) & " "
& CStr(dblCenterY + CRatio * dblRadius) & " " & CStr(dblCenterX -
dblRadius) & " " & CStr(dblCenterY) & " c" & strCR
strTemp = strTemp & CStr(dblCenterX - dblRadius) & " " &
CStr(dblCenterY - CRatio * dblRadius) & " " & CStr(dblCenterX - CRatio
* dblRadius) & " " & CStr(dblCenterY - dblRadius) & " " &
CStr(dblCenterX) & " " & CStr(dblCenterY - dblRadius) & " c" & strCR
strTemp = strTemp & CStr(dblCenterX + CRatio * dblRadius) & " " &
CStr(dblCenterY - dblRadius) & " " & CStr(dblCenterX + dblRadius) & " "
& CStr(dblCenterY - CRatio * dblRadius) & " " & CStr(dblCenterX +
dblRadius) & " " & CStr(dblCenterY) & " c" & strCR
If boolFill Then
strTemp = strTemp & "b" & strCR
End If
strTemp = strTemp & "S" & strCR
strTemp = strTemp & "Q" & strCR
DrawCircle = strTemp
End Function
'------
The call would be something like:
strXYDataStream = strXYDataStream &
DrawCircle(Round(dblXCenterPoints + DataRS("X") * dblPointsPerUnit, 3),
Round(dblYCenterPoints + DataRS("Y") * dblPointsPerUnit, 3), 2, 0.1,
0.1, 0.1, 0.3, True, 1#, 0#, 0#)
Some of the information found for drawing PDF circles was from
www.tinaja.com. The black border for the circle is actually 0.1 0.1
0.1 instead of 0 0 0 so it's not quite fully black. A small circle in
the center of the Adobe Reader screen can be seen using the following
layout text in my PDFLayoutViewer:
q
0.3 w
1 0 0 rg
0.1 0.1 0.1 RG
308 396 m
308 397.1045695 307.1045695 398 306 398 c
304.8954305 398 304 397.1045695 304 396 c
304 394.8954305 304.8954305 394 306 394 c
307.1045695 394 308 394.8954305 308 396 c
b
S
Q
Huge circles should require more than four Bezier Curves in order to
display properly. I did some autoscaling with the histogram program so
doing that would not be difficult. I think the UI will be the hardest
part. Titles are easy. A light gray grid underneath would be pretty
easy to do. I can also let the user choose landscape or portrait
through toggle buttons on a form and changing one of the PDF functions
(AddPage) to accept a boolean:
If boolPortrait Then
strTemp = strTemp & " /MediaBox [0 0 612 792]" & strCR
strTemp = strTemp & " /CropBox [0 0 612 792]" & strCR
Else
strTemp = strTemp & " /MediaBox [0 0 792 612]" & strCR
strTemp = strTemp & " /CropBox [0 0 792 612]" & strCR
End If
This might bring some joy.
James A. Fortune
CD********@FortuneJames.com