Chart to image

hi,
is there a way to convert chart to image, i am using php in
server side.
thanks

hello,
I am struggling with images for a while now and i have the
solution for you.
Its not the full solution, but the following code will take
any component and copy it to an image.
You only have to figure out how to save it server side.
Greets, jacob
working example:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import flash.display.BitmapData;
import flash.geom.Matrix;
public function takeImage():void
//set image dimensions
mychartcopyimg.width=areachart1.width;
mychartcopyimg.height=areachart1.height;
//put original component into bitmapdata
var bmpData:BitmapData = new BitmapData( areachart1.width,
areachart1.height, true, 0xe4e4e4 ) ;
bmpData.draw( areachart1,null,null,null,null,true ) ;
//new matrix for copy image
var m : Matrix = new Matrix() ;
//scale the image to the size of the chart
m.scale( mychartcopyimg.width / areachart1.width,
mychartcopyimg.height / areachart1.height ) ;
//draw the copyed chart into the image
mychartcopyimg.graphics.beginBitmapFill( bmpData, m, false,
true ) ;
mychartcopyimg.graphics.drawRect( 0, 0,
mychartcopyimg.width, mychartcopyimg.height ) ;
mychartcopyimg.graphics.endFill();
]]>
</mx:Script>
<mx:AreaChart x="29" y="96" id="areachart1" width="201"
height="188">
<mx:series>
<mx:AreaSeries displayName="Series 1" yField=""/>
</mx:series>
</mx:AreaChart>
<mx:Legend dataProvider="{areachart1}"/>
<mx:Image x="364" y="143" id="mychartcopyimg"/>
<mx:Button x="240" y="351" click="takeImage()"
label="Take image"/>
</mx:WindowedApplication>

Similar Messages

  • How to change the bar chart rendering image format in SSRS

    Hello all,
    I am working with SQL Server 2008 R2 and I have a SSRS bar chart report, when the report got rendered over online or if the take Export (PDF and PPT), the image is in png format always, which is taking too much of time to execute the report in case of large
    data.
    Can, It be possible that the rendered image is in jpeg format instead of png.
    If Yes, please share the appropriate steps to follow:
    Thanks in advance
    Pankaj Kumar Yadav-

    Hi Pankaj067,
    According to your description, you want to change the bar chart rendering image format as JPEG format when previewing the report or exporting to a PDF file .
    In Reporting Services, the chart rendering image format is PNG by default. It’s a by-design behavior. And it doesn’t open any API for us to change the image type when exporting a chart to a format. So in your scenario, your requirement can’t be achieved
    in Reporting Services currently. I would recommend you submit a feature request to Microsoft at this site:
    https://connect.microsoft.com/SQLServer. So that we can try to modify and expand the product features based on your needs.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • No charts or images displayed in DHTML Viewer on WebLogic 10.3

    Greetings,
    When I view crystal reports from CMC in the default DHTML viewer a red 'X' appears in place of charts and images. Charts in Active X and Java viewers appear normally. Running reports from Java SDK (PDF output) displays charts normally.
    Our Environment:
    BOE 3.1 SP2 (Fix Pack 5)
    2 Clustered Servers running on Windows Server 2008
    Web tier components on WebLogic 10.3 JAAS
    Input/Output Repositories on Shared Storage
    I have tried different things but nothing seems to resolve it. I tried searching for the dynamic image file created by the DHTML viewer but I couldn't find it. I looked in the Shared storage, both local servers, and the weblogic server... No trace.
    It is essential that we have DHTML working as our users don't have admin permissions to install the JRE or Active X.
    Thank you for your help.
    Regards,
    Hassan

    Hi,
    One obvious reason would be that you did not specify -trustcacerts, and the root CA is not included in the present server keystore. In that case, using the -trustcacerts option would solve the problem, if the root CA is indeed in the JDK cacerts.
    To print out the certificates present in the JDK cacerts, use the following command:
    keytool -list -keystore <JAVA_HOME>/jre/lib/security/cacerts -storepass changeit -v
    Then check if the root CA that signed your server certificate is present, and has not expired (in which case,you would need to re-import a newer one into cacerts).
    Another common reason for that error message is when you have used a proprietary CA to sign your server certificate. Then it would obviously not be in the JDK cacerts. The solution in that case is to import your proprietary root CA into the JDK cacerts, using the following command:
    keytool -import -keystore <JAVA_HOME>/jre/lib/security/cacerts -file yourRootCA.pem -storepass changeit -alias youralias
    A third reason for that error message is when your server was signed by an intermediate certificate. In that case, you would have received from your CA a chain of certificates. One way to solve this (not the only one, but this one works well): Prepend your intermediate CA file to your server cert file, and import the obtained concatenated file into the server keystore. Be careful, the intermediate CA must be BEFORE the server cert. Example:
    copy rootca.cer certchain.p7b
    type server.cer >> certchain.p7b
    The file certchain.p7b will be the concatenation of the intermediate CA and the signed server cert. Then import the newly created file under the key alias as follows:
    keytool -import -keystore serverks.jks -file certchain.p7b -alias yourkey -trustcacerts
    If you only prepend the intermediate root CA, you must make sure the the final root CA is in cacerts. But you can also prepend your whole chain of trust inside the server keystore.
    Regards,
    Kal

  • Anychart (render the chart as image)..

    Hi all and Javascript experts..
    Anychart Version: 5.1.2
    Apex Version: 3.2
    Oracle Database: 11g
    Is it possible to generate an "image of the chart" (instead of flash) content with anychart ?
    I mean ,if i run a chart in a APEX application, instead of genating a flash chart a Jpeg or PNG need to be genarated on the fly.
    i know in anychart we have a functionality that users can "right click" on the flash chart and "save it as a image". I dont know is there any way that we can use
    this functionality to render the chart as image.
    i found the following link..
    http://www.anychart.com/products/anychart/docs/users-guide/index.html?SaveAsImage.htmlthat mentioned about the save as image part.. Please help me if any one has any ideas to do this..
    Thanks
    SN
    Edited by: SN on Dec 28, 2010 7:19 AM

    Hi,
    maybe you can take a look at this example : http://anychart.com/products/stock/online-demos/html-js-samples-center/export-auto-to-server/index.html?v=1.0.0r7488#sampleView
    Yann.

  • Failed to download chart or image in SharePoint 2010 excel services

    Hi,
    I have one document library in SharePoint 2010. I have uploaded one excel sheet which is having chart. Now when I am trying to open it in browser, but it is showing me below error on chart part of excel sheet.
    'Failed to download chart or Image'
    This is happening on prod server. I tried similar process on lower environment in SharePoint 2010. It is absolutely working fine. I checked all services, settings on both farm but doesn't find any clue.
    Please help.

    Hi,
    What do you mean by lower environment? Does it mean the lower version of SharePoint server?
    To solve this issue should try changing the "Maximum Chart Size" Excel Services Trusted Location setting. 
    By default it is 1MB, so if a chart is bigger than that, it won't render.
    For similar issues, please refer to the following articles:
    http://www.sbeeh.com/post/SharePoint-2010-Excel-Service-Failed-to-download-chat-or-image.aspx
    http://social.msdn.microsoft.com/Forums/en-US/sharepointexcel/thread/208d649b-31a9-4d13-8ee3-3984fb92bb85
    Thanks,
    Rock Wang
    Rock Wang TechNet Community Support

  • Missing charts and images in DHTML viewer

    We are using Crystal 2008 and rendering the report using the browser based DHTML viewer. The report in question contains multiple subreports as well as charts and images. When first viewing the report, none of the charts or images are visible unless we reduce the zoom level to 75% and then they get displayed. If the zoom level is set to standard (100%) the charts and images do not display unless you drill into the subreports.
    We tried applying all the service packs up to SP2 to no avail. Is this a bug in the viewer and if so what can be done about it? We have found multiple issues with displaying images and charts in the DHTML viewer.

    What if its not a zoom issue but rather a postback issue?  The report initially comes up blank, when you change the zoom factor, CR is actuially doing a postback.   If you change the zoom factor back to 100, is it still there?
    Put a button on the page that does nothing and then click on the button without doing anything in the viewer (This will cause a postback).  Does the report come up?
    If so, then it is probably a postback issue.
    Ludek

  • Save excel chart as image (activeX)

    Hi community,
    I have to generate couple thousands xls files which have some data and a chart on the first sheet. Once the files are generated I'd like to sweep thru all of them and save the chart as an image (BMP, GIF, PNG, doesnt matter).
    I have no success though. I assume I am quite close, by using the Chart.export method, but actually nothing happens, the file is not created. (worksheet selection is good, and chart index must be one, as 0 or 2 gives me an error message while one is OK.
    Any ideas?
    thx.
    ps: i know how to export an image of a labview-chart, but I want the export to happen from excel..
    Solved!
    Go to Solution.

    Instead of getting a reference to the workbook worsheets collection you need to get a reference to the workbook charts collection (which is the collection of all the workbook chartsheets) . You select the chart sheet using its index and convert the resulting item to an Excel._Chart object (this is where you use this object). You can then export it.
    Ben64

  • How to save the chart as image in the blob?

    Hi,
    I found a few topics with this problem but none solved the problem.
    So, I have a chart created in the IR report and want to convert it to an image and save it in blob.
    I want to print it later or it will send an e-mail
    I use APEX 4.0
    Thanks

    Can someone help with this?

  • Combining a chart's image JPEG with a text label?

    Hi
    I am creating a JPEG file of a chart's plot. This works fine using the 'Write JPEG File'.
    As I have 8 charts in the VI to save to file, I have identified eact one using the label text. This appears OK when running but after saving the charts to file there is just a black rectangle (see attachment.
    Anyway around this?
    Thanks Harry.
    Attachments:
    PARR1_91420071355.jpg ‏23 KB

    This is because the background color defaults to black.
    Wire a color box to the BG Color input of the Get Image method.
    Or, make the label white.
    Or, use a purple or green color as background, and Create Mask to mask out
    that color.
    Or, put the label on the graph instead of above it.
    Regards,
    Wiebe.

  • Programmatic skinning, charts and images.  Oh My!

    So here is a sample of the code I'm working with:
    for (var i:int = 0; i< numBlocks; i++) {
    var tmpImg:Image = new Image();
    tmpImg.source = "test_disc_one.png";
    tmpImg.y = startY - (8*i);
    tmpImg.blendMode = BlendMode.NORMAL;
    trace("["+i+"]: " + this.parent);
    parent.addChild(tmpImg);
    This code is triggered when updateDisplayList() is called on
    the ColumnSeries within my chart. (<mx:ColumnSeries
    id="actualColumn" yField="Score" name="actual"
    itemRenderer="com.test.IconicBlockRenderer" />) I'm trying to
    display the png for each datapoint on the graph. There is some
    tweaking and programmagic stuff behind it (determine different
    images and such based on values) . I have tried using
    graphics.beginBitmapFill() with bitmaps but whereever the images
    intersect becomes transparent. And calling parent.addChild above
    locks the player into and endless loop. I'm at a loss on this one.
    Any help thoughts, pointing of directions would be helpful.
    I should also mention that the code itself works. When
    dropped into <mx:Application><mxScript> it works like a
    charm. When I tried moving it into the chart renderer all I got was
    empty space the images don't show up.
    Additionally, is it even possible to pass parameters to the
    renderer? Meaning is it possible to do something *like*
    <mx:ColumnSeries id="actualColumn" yField="Score"
    name="actual" itemRenderer="com.test.IconicBlockRenderer(tArray)"
    />
    _Anthony

    Guys,
    I know it wasn't that simple so I did not get any reply for this thread. Thanks for all your support.
    we have found a solution for this issue.
    Steps we did was
    1. Right-click My Computer and click Manage.
    2. Navigate to Services and Applications > Internet Information Services (IIS) Manager > Web Sites > Default Web Site.
    3. Right-click crystalreportviewers115 and then click Properties.
    4. On the ASP.NET tab, choose a 2.0.x version from the ASP.NET Version list.
    5. Click the Apply button and then click OK.
    6. Right-click businessobjects and click Properties.
    7. On the Virtual Directory tab, click the Configuration button.
    8. Check the path of the mappings and note the version number (in the path ...\Framework\vX.X...)
    9. Repeat steps 2 to 5 for crystalreportsviewers115.
    If the paths for businessobjects and crystalreportviewers115 are different, change one or the other so that they point to the same version of .NET Framework.
    10. Stop and restart the Default Web Site.
    Thanks
    -Azhar

  • Exporting Charts as images

    Hello everyone,
    I have a little script that generates a GUI with text reports, but also some charts for things like free/used HDD space.
    Is there a way to export these charts to a .jpg file so that I can include them in a HTML report?
    The only thing I found on the net was a Module called PowerBoots which seems like it was able to do this. But its no longer available.
    Any ideas?

    Hi there,
    Try SaveImage Method on your chart object: https://msdn.microsoft.com/en-us/library/dd456181.aspx

  • Apex charts - right click, save as image (not responding)

    Hi,
    Yesterday when our users attempted to right-click on an anychart produced by Apex, then save as image - they were able to identify a location to save to, however the infinity image labelled 'saving' was presented indefinitely.
    At the same time, I noticed Anychart.com was down. This morning when I attempted the same action, now that Anychart.com is up, the process worked - correlation = causation?
    A previous post seems to suggest it might be possible to localise whatever is converting the chart to images/pdf
    Save as pdf/image does not work. It runs and runs ... Getting no output
    Does anyone have any further details on this? I can't locate any existing references to anychart.com within my application, constructed source, /i/ folder etc.
    Cheers
    Scott

    Hi Scott,
    So, if i understand properly, making this change
    <settings><pdf_export file_name="mychart.pdf" use_title_as_file_name="true" url="/i/AnyChart4_SaveAsPDF_php4/PDFSaver.php" image_type="jpg" />
    will avoid atleast PDF issue? And as i dont have privileges to install or deinstall anything on /i/ folder, still this will work and URL path will remain same for each installation?
    Adding another question, as you said "it sends base64 information when converting to PDF", does it mean i will not be able to convert to PDF, if i am using intranet and PC's not accessible to internet?
    Thanks
    Sunil Bhatia

  • In Answers Chart Images can't be displayed

    Installed BIEE 10.1.3.3.2, run demo, in Answers the chart images can not be displayed.

    Hi,
    I am having this problem too, installing the ActiveX component hasn't fixed this for me. Everything else works fine but when I try and display a chart the image just displays a red cross?
    Any help would be much appreciated,
    John

  • Reporting Service chart image switch issue in Outlook

    Hello~
    I'm receiving report as email everyday.
    That email is send by Reporting Service of MS-SQL.
    I receive several report similar format as one RDL.
    There are chart , table, image.
    All objects in Report Mail was rendered MHTML. 
    However, some Chart image cached in the outlook.
    Then sometimes cached chart image displayed other email.
    I've changed rendering option of subscription.
    It still occur my email.
    It might be solved as disable cache option of Outlook account, but outlook is very slow working.
    I'd like to know solution as RS side.
    Thank you.

    Hi,
    Have you tried to create a new Outlook profile
    for your account? The issue may be caused by the corrupted Outlook profile which is cached to local machine.
    After creating a new profile for Outlook using cached mode, the mailbox data is re-synced from server to Outlook client new profile. And hope the issue doesn't happen in the new profile.
    Regards,
    Winnie Liang
    TechNet Community Support

  • CrystalReportViewer resizes images and charts

    I've got a nasty bug with CrystalReportViewer that I can't solve.
    When the asp-website shows a report every image (and chart) is resized to about 15x15 pixels (measured with eye). Even toolbar images are resized and it looks kind of nasty. The same problem occurs even if I create a blank webpage (to same project) with just the report I want to show. When I export the report, all images are just fine. I don't have a clue what might affect this crystal report viewer but I hope you have.
    I'm developing with CR 2008 in visual studio 2008. Project is with ASP and c#.
    I've got the same problem with (at least) following:
    - Both Crystal Reports embedded and Crystal Reports 2008.
    - XP and Vista
    - Firefox and IE

    The images and charts vary from about 20x40 (which is streched from side to side as a separator bar) to over 200x200px. One chart is almost as wide as the report. The original size does not affect the result since every chart and image is resized for some reason to that small size. And every chart and picture will show as the same size.
    I tested only with pdf-format because I presume that the problem occurs only in the website. Could something affect the image handler of crystal reports?
    I haven't installed that SP 0 because it is for older version of CR 2008

Maybe you are looking for