ChartFX render

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ChartFX render

Tom Parker-15
On Windows XP, LP8.5.4, I am creating a ChartFX graph that I will need to
add to a PDF as a .png image.  Using [ChartFX->Serve], I have the chart
displaying on a page using the <img></img> tag method.  When I replace
[ChartFX->Serve] with [ChartFX->Render], I expect the .png to show up in
C:Windows\Temp\chartfx62\temp\ which I have set in ChartFX.Internet.config
(and I have created those folders).  File permissions are set to allow
uploads to that same path.

Questions:

Am I correct to assume I need to use [ChartFX->Render] to make the .png
available for later use, or can I somehow grab the .png that shows up on the
page using [ChartFX->Serve]?

In the ChartFX docs, the Windows recommended path is C:Temp\ChartFX62\temp,
but I also tried that with no success.  Am I missing a file permission step?

Thanks,

--Tom Parker



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: ChartFX render

Fletcher Sandbeck-3
On 8/27/08 at 2:29 PM, [hidden email] (Tom Parker) wrote:

>On Windows XP, LP8.5.4, I am creating a ChartFX graph that I will need
>to add to a PDF as a .png image.  Using [ChartFX->Serve], I have the
>chart displaying on a page using the <img></img> tag method.  When I
>replace [ChartFX->Serve] with [ChartFX->Render], I expect the .png to
>show up in C:Windows\Temp\chartfx62\temp\ which I have set in
>ChartFX.Internet.config (and I have created those folders).  File
>permissions are set to allow uploads to that same path.
>
>Questions:
>
>Am I correct to assume I need to use [ChartFX->Render] to make the
>.png available for later use, or can I somehow grab the .png that
>shows up on the page using [ChartFX->Serve]?
>
>In the ChartFX docs, the Windows recommended path is
>C:Temp\ChartFX62\temp, but I also tried that with no success.  Am I
>missing a file permission step?

You should use [ChartFX->Data].  That will return the raw data
of the generated image.  Then you can use [File_Write] to put it
in a .png file anywhere you need it.

var('mychart') = chartf;
...
var('png') = $mychart->data;
file_create('mychart.png', -fileoverwrite);
file_write($png, 'mychart.png');

Using these tags is easier than getting the temporary folder set
up for [ChartFX->Render].

[fletcher]

--
Fletcher Sandbeck                         [hidden email]
LassoSoft, LLC                          http://www.lassosoft.com


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: ChartFX render

Tom Parker-15
In reply to this post by Tom Parker-15
Thanks Fletcher.  Now, I get, "Permission to open the file was denied by
Lasso security." on the File_Write.

My permissions all seem to be set correctly, and I use File_Write
successfully in other places throughout the site.  .png is allowed file
extension for uploads.  Any thoughts?

--Tom

----- Original Message -----
From: "Fletcher Sandbeck" <[hidden email]>
To: "Lasso Talk" <[hidden email]>
Sent: Wednesday, August 27, 2008 2:35 PM
Subject: Re: ChartFX render


On 8/27/08 at 2:29 PM, [hidden email] (Tom Parker) wrote:

>On Windows XP, LP8.5.4, I am creating a ChartFX graph that I will need
>to add to a PDF as a .png image.  Using [ChartFX->Serve], I have the
>chart displaying on a page using the <img></img> tag method.  When I
>replace [ChartFX->Serve] with [ChartFX->Render], I expect the .png to
>show up in C:Windows\Temp\chartfx62\temp\ which I have set in
>ChartFX.Internet.config (and I have created those folders).  File
>permissions are set to allow uploads to that same path.
>
>Questions:
>
>Am I correct to assume I need to use [ChartFX->Render] to make the
>.png available for later use, or can I somehow grab the .png that
>shows up on the page using [ChartFX->Serve]?
>
>In the ChartFX docs, the Windows recommended path is
>C:Temp\ChartFX62\temp, but I also tried that with no success.  Am I
>missing a file permission step?

You should use [ChartFX->Data].  That will return the raw data
of the generated image.  Then you can use [File_Write] to put it
in a .png file anywhere you need it.

var('mychart') = chartf;
...
var('png') = $mychart->data;
file_create('mychart.png', -fileoverwrite);
file_write($png, 'mychart.png');

Using these tags is easier than getting the temporary folder set
up for [ChartFX->Render].

[fletcher]

--
Fletcher Sandbeck                         [hidden email]
LassoSoft, LLC                          http://www.lassosoft.com


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/





--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: ChartFX render

Tom Parker-15
In reply to this post by Tom Parker-15
OK, now I added "Allow any file extension" to the web root path and I'm
getting this error:

An unexpected error occurred: 22: Invalid argument.
at: onCreate with params: �PNG\r\n\n
at: write with params: �PNG\r\n\n

(referring to the line with File_Write, using the exact code you suggested
below).

Thanks,

--Tom

----- Original Message -----
From: "Tom Parker" <[hidden email]>
To: "Lasso Talk" <[hidden email]>
Sent: Wednesday, August 27, 2008 3:13 PM
Subject: Re: ChartFX render


> Thanks Fletcher.  Now, I get, "Permission to open the file was denied by
> Lasso security." on the File_Write.
>
> My permissions all seem to be set correctly, and I use File_Write
> successfully in other places throughout the site.  .png is allowed file
> extension for uploads.  Any thoughts?
>
> --Tom
>
> ----- Original Message -----
> From: "Fletcher Sandbeck" <[hidden email]>
> To: "Lasso Talk" <[hidden email]>
> Sent: Wednesday, August 27, 2008 2:35 PM
> Subject: Re: ChartFX render
>
>
> On 8/27/08 at 2:29 PM, [hidden email] (Tom Parker) wrote:
>
>>On Windows XP, LP8.5.4, I am creating a ChartFX graph that I will need
>>to add to a PDF as a .png image.  Using [ChartFX->Serve], I have the
>>chart displaying on a page using the <img></img> tag method.  When I
>>replace [ChartFX->Serve] with [ChartFX->Render], I expect the .png to
>>show up in C:Windows\Temp\chartfx62\temp\ which I have set in
>>ChartFX.Internet.config (and I have created those folders).  File
>>permissions are set to allow uploads to that same path.
>>
>>Questions:
>>
>>Am I correct to assume I need to use [ChartFX->Render] to make the
>>.png available for later use, or can I somehow grab the .png that
>>shows up on the page using [ChartFX->Serve]?
>>
>>In the ChartFX docs, the Windows recommended path is
>>C:Temp\ChartFX62\temp, but I also tried that with no success.  Am I
>>missing a file permission step?
>
> You should use [ChartFX->Data].  That will return the raw data
> of the generated image.  Then you can use [File_Write] to put it
> in a .png file anywhere you need it.
>
> var('mychart') = chartf;
> ...
> var('png') = $mychart->data;
> file_create('mychart.png', -fileoverwrite);
> file_write($png, 'mychart.png');
>
> Using these tags is easier than getting the temporary folder set
> up for [ChartFX->Render].
>
> [fletcher]
>
> --
> Fletcher Sandbeck                         [hidden email]
> LassoSoft, LLC                          http://www.lassosoft.com
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: ChartFX render

stevepiercy
You got some gremlins in there.  Suggest not copying and pasting to avoid them, and instead type manually the params.

--steve


On Wednesday, August 27, 2008, [hidden email] (Tom Parker) pronounced:

>OK, now I added "Allow any file extension" to the web root path and I'm
>getting this error:
>
>An unexpected error occurred: 22: Invalid argument.
>at: onCreate with params: ?PNG\r\n\n
>at: write with params: ?PNG\r\n\n
>
>(referring to the line with File_Write, using the exact code you suggested
>below).
>
>Thanks,
>
>--Tom
>
>----- Original Message -----
>From: "Tom Parker" <[hidden email]>
>To: "Lasso Talk" <[hidden email]>
>Sent: Wednesday, August 27, 2008 3:13 PM
>Subject: Re: ChartFX render
>
>
>> Thanks Fletcher.  Now, I get, "Permission to open the file was denied by
>> Lasso security." on the File_Write.
>>
>> My permissions all seem to be set correctly, and I use File_Write
>> successfully in other places throughout the site.  .png is allowed file
>> extension for uploads.  Any thoughts?
>>
>> --Tom
>>
>> ----- Original Message -----
>> From: "Fletcher Sandbeck" <[hidden email]>
>> To: "Lasso Talk" <[hidden email]>
>> Sent: Wednesday, August 27, 2008 2:35 PM
>> Subject: Re: ChartFX render
>>
>>
>> On 8/27/08 at 2:29 PM, [hidden email] (Tom Parker) wrote:
>>
>>>On Windows XP, LP8.5.4, I am creating a ChartFX graph that I will need
>>>to add to a PDF as a .png image.  Using [ChartFX->Serve], I have the
>>>chart displaying on a page using the <img></img> tag method.  When I
>>>replace [ChartFX->Serve] with [ChartFX->Render], I expect the .png to
>>>show up in C:Windows\Temp\chartfx62\temp\ which I have set in
>>>ChartFX.Internet.config (and I have created those folders).  File
>>>permissions are set to allow uploads to that same path.
>>>
>>>Questions:
>>>
>>>Am I correct to assume I need to use [ChartFX->Render] to make the
>>>.png available for later use, or can I somehow grab the .png that
>>>shows up on the page using [ChartFX->Serve]?
>>>
>>>In the ChartFX docs, the Windows recommended path is
>>>C:Temp\ChartFX62\temp, but I also tried that with no success.  Am I
>>>missing a file permission step?
>>
>> You should use [ChartFX->Data].  That will return the raw data
>> of the generated image.  Then you can use [File_Write] to put it
>> in a .png file anywhere you need it.
>>
>> var('mychart') = chartf;
>> ...
>> var('png') = $mychart->data;
>> file_create('mychart.png', -fileoverwrite);
>> file_write($png, 'mychart.png');
>>
>> Using these tags is easier than getting the temporary folder set
>> up for [ChartFX->Render].
>>
>> [fletcher]
>>
>> --
>> Fletcher Sandbeck                         [hidden email]
>> LassoSoft, LLC                          http://www.lassosoft.com
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: ChartFX render

Tom Parker-15
In reply to this post by Tom Parker-15
Steve,

I'm not sure these are gremlins from the code (I did go back through and
type everything again after eliminating all white space)...aside from the
file tags, when I display $png, which is the result of $mychart->data, it
returns (Square, "PNG", Square, lots of squares, etc.), so file_write
appears to be choking on the output from $mychart->data.  Not sure whether
it's an encoding issue, or I'm missing a step?

Again, if I replace $mychart->data with $mychart->serve, the chart appears
just fine, so the chart itself is OK.

I'm sure this is something simple and obvious I'm missing.

Thanks,

--Tom

----- Original Message -----
From: "Steve Piercy - Web Site Builder" <[hidden email]>
To: "Lasso Talk" <[hidden email]>
Sent: Wednesday, August 27, 2008 5:03 PM
Subject: Re: ChartFX render


You got some gremlins in there.  Suggest not copying and pasting to avoid
them, and instead type manually the params.

--steve


On Wednesday, August 27, 2008, [hidden email] (Tom Parker) pronounced:

>OK, now I added "Allow any file extension" to the web root path and I'm
>getting this error:
>
>An unexpected error occurred: 22: Invalid argument.
>at: onCreate with params: ?PNG\r\n\n
>at: write with params: ?PNG\r\n\n
>
>(referring to the line with File_Write, using the exact code you suggested
>below).
>
>Thanks,
>
>--Tom
>
>----- Original Message -----
>From: "Tom Parker" <[hidden email]>
>To: "Lasso Talk" <[hidden email]>
>Sent: Wednesday, August 27, 2008 3:13 PM
>Subject: Re: ChartFX render
>
>
>> Thanks Fletcher.  Now, I get, "Permission to open the file was denied by
>> Lasso security." on the File_Write.
>>
>> My permissions all seem to be set correctly, and I use File_Write
>> successfully in other places throughout the site.  .png is allowed file
>> extension for uploads.  Any thoughts?
>>
>> --Tom
>>
>> ----- Original Message -----
>> From: "Fletcher Sandbeck" <[hidden email]>
>> To: "Lasso Talk" <[hidden email]>
>> Sent: Wednesday, August 27, 2008 2:35 PM
>> Subject: Re: ChartFX render
>>
>>
>> On 8/27/08 at 2:29 PM, [hidden email] (Tom Parker) wrote:
>>
>>>On Windows XP, LP8.5.4, I am creating a ChartFX graph that I will need
>>>to add to a PDF as a .png image.  Using [ChartFX->Serve], I have the
>>>chart displaying on a page using the <img></img> tag method.  When I
>>>replace [ChartFX->Serve] with [ChartFX->Render], I expect the .png to
>>>show up in C:Windows\Temp\chartfx62\temp\ which I have set in
>>>ChartFX.Internet.config (and I have created those folders).  File
>>>permissions are set to allow uploads to that same path.
>>>
>>>Questions:
>>>
>>>Am I correct to assume I need to use [ChartFX->Render] to make the
>>>.png available for later use, or can I somehow grab the .png that
>>>shows up on the page using [ChartFX->Serve]?
>>>
>>>In the ChartFX docs, the Windows recommended path is
>>>C:Temp\ChartFX62\temp, but I also tried that with no success.  Am I
>>>missing a file permission step?
>>
>> You should use [ChartFX->Data].  That will return the raw data
>> of the generated image.  Then you can use [File_Write] to put it
>> in a .png file anywhere you need it.
>>
>> var('mychart') = chartf;
>> ...
>> var('png') = $mychart->data;
>> file_create('mychart.png', -fileoverwrite);
>> file_write($png, 'mychart.png');
>>
>> Using these tags is easier than getting the temporary folder set
>> up for [ChartFX->Render].
>>
>> [fletcher]
>>
>> --
>> Fletcher Sandbeck                         [hidden email]
>> LassoSoft, LLC                          http://www.lassosoft.com
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/ 



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/