Jump to content
Software FX Community

Chartfx62 image and printing issues


binukjohn

Recommended Posts

I am using Chartfx62 in .NET web forms..Currently I am seeing the chart in my browser as png images saved on my local drive.

<td align="left" colspan="2" style="height: 310px">

  <IMG SRC="/chartfx62/temp/CFT0303_0217403C4D3.png"  WIDTH="800" HEIGHT="400" >

</td> 

1)I want to print the chart from browser. What are the options available? Do u have samples? I tried searching ur API but did not find any.appreciate if someone could copy paste code here.

2) If the chart is rendered as images, there will be huge demand on client disk space. Is there a way to delete the images programmatically?

3) What are the other options of rendering other than image?

Link to comment
Share on other sites

  • 4 months later...

Hi, 1)I want to print the chart from browser. What are the options available? Do u have samples? I tried searching ur API but did not find any.appreciate if someone could copy paste code here.The chart's printer object expose the following public methodspublic void Print ()public void Print (int fromPage, int toPage)public DialogResult PrintDialog ()public DialogResult PrintDialog (bool fromTo)public DialogResult PrintPreview ()Note that to minimize footprint and/or WinForms dependencies these methods are not present in our server component, since you do not want to the chart to be printed in your data center.In your case you have to script the client control (so you will need full trust), in the client control you will have access to all the previously mentioned methods. You don't have to modify the way you are currently building your ASPX pages, all you have to do is add code to script/handle events on the client. Please check a sample in our support site, under Miscellaneous named "Events - Get Tip". Note that scripting a .net control in the browser requires full trust.2) If the chart is rendered as images, there will be huge demand on client disk space. Is there a way to delete the images programmatically?

While newer versions of Chart FX (Chart FX 7) have a mechanism to avoid a backlog of temporary files, Chart FX for .Net 6.2 does not automatically clean temporary files from disk. You will need to schedule a task  that deletes files form that folder periodically.

In the Util folder of your Chart FX installation, you should find the sfxremove.exe tool which lets you remove files older than any time span. You can simply schedule this app to run at your convenience or you can use your own batch file in order to remove the files.

3) What are the other options of rendering other than image?

As a server control, Chart FX supports a method called GetHtmlTag that allows the developer to select, among other things, the type of desired output for your charts. By default, Chart FX will generate a PNG image of the chart, yet you may configure the getHtmlTag method or the HtmlTag property to the desired format. Among the options, Chart FX can generate the following chart formats:

- ActiveX- .NET- PNG- JPEG- SVG- Flash

By default, Chart FX will generate an image. By setting the third parameter to "Auto", Chart FX will generate the most interactive format depending on the User Agent of the browser requesting the chart. If the browser is Internet Explorer with the .NET Framework installed, Chart FX will generate a .NET component. If the browser is Internet Explorer 4 or above, without the .NET Framework, an ActiveX will be generated. For the rest of the browsers an image will be generated in Png or Jpeg format, depending on the browser's capabilities.

Regards,

RandyJ

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...