How to Generate Chart (line chart, bar chart)!

I want to generate Graphic Chart using Java,(e.g. line chart, bar chart).
Is any Class can easy to generate Chart??
thanks!

petes1234 wrote:
meacod wrote:
Dimpu wrote:
i need the source code how to generate the graphs using the Java
Give me teh codes?
And yes, this thread is old.Also note how the poster here politely requests help along with the use of the word "please". Very instructive. He'll get far here.Indeed, you are wise in the ways of the fool **bows politely**

Similar Messages

  • Seek 2D Line and Bar Chart Graphs HOWTO

    Can anyone share with me on where I could obtain/teach
    me how to write 2D Line and Bar Chart Graphs ?
    I like the class/program to be called from java code and not
    from command prompt to plot points or bar graphs.
    Please, no vendor recommendations.
    I dont have the $ to purchase.
    Any help is appreciated.
    Thanks

    I checked the web site of JFreeChart and its document
    says to get premium service, it requires $.
    I dont really have the $ to purchase that software.
    It's a vendor product!Just to clarify, JFreeChart is free software, it is licensed under the GNU LGPL. You get the complete source code, including lots of demos, Javadoc HTML pages, an install document in PDF format, and access to the support forum for absolutely no charge. You don't have to pay a fee to unlock special features in the software, everything is there in the free download.
    As a way of funding the project, we sell a JFreeChart Developer Guide which includes a lot more information about using JFreeChart. But it is only the documentation we sell, not the software.
    Hope that helps,
    Dave Gilbert
    JFreeChart Project Leader
    http://www.object-refinery.com/jfreechart/index.html

  • How to draw a straight  dotted line on Bar chart at 70%?

    Hi
    Could you please let me know how to draw a straight dotted line on BAR CHART at 70%?
    Thank you

    Hi,
    This may vary depending on what version of crystal you are using.
    Right click on the graph & go to 'chart options' & choose 'Grids'
    In the grids pane go to the grids tab.  From there check the 'draw custom line at' and specify where you want to draw the custom line.
    Once the line is drawn highlight the line, right click and go to 'chart options' & 'selected item'.
    select what format you want the line to look like (choose the dashed one).
    good luck!

  • How to plot line and bar chart in one graph

    i have one graph, but in this graph i want to plot line or bar chart using radio button selection.
    can i do that...

    You must have 2 data arrays or plots to get this. Make sure your plot legend is visible. Drag the plot legend vertical borders to view both plots. Select one of the plot to be bar plot (See the attachment)
    Attachments:
    BarPlots.PNG ‏14 KB

  • How to display 3 lines in an AnyChart candlestick flash chart ?

    Hi,
    I have a nice Candlestick flash chart and I am using Anychart 5.1.2. i would like to display 3 horizontal bar lines on this chart.
    The values on the y axis on these 3 bar lines are contained into 3 items. Do you have an idea on how to display these lines with the XML ? Here is the XML existing.
    <?xml version = "1.0" encoding="utf-8" standalone = "yes"?>
    <root>
      <type>
        <chart type="Candlestick">
          <animation enabled="no"/>
          <hints auto_size="yes">
            <text><![CDATA[{NAME}
    Niveau maxi: {HIGH}
    Niveau moyen: {OPEN}
    Niveau mini: {LOW}]]>
    </text>
            <font type="Verdana" size="10" color="0x000000" />
          </hints>
          <names show="yes" width="150" placement="chart" position="bottom" >
            <font type="Verdana" size="10" color="0x000000" />
          </names>
          <values show="no" prefix="" postfix=" m ngf" decimal_separator="." decimal_places="0" />
          <arguments show="no" />
          <candlestick_chart>
            <bulls>
              <background enabled="yes" color="White" />
            </bulls>
            <bears>
              <background enabled="yes" color="Black" />
            </bears>
          </candlestick_chart>
        </chart>
        <workspace>
          <background enabled="yes" type="solid" color="0xffffff" alpha="0" />
          <base_area enabled="no" />
          <chart_area enabled="yes" x="80" y="50" width="670" height="280" deep="0">
            <background enabled="no"/>
            <border enabled="yes" size="1"/>
          </chart_area>
          <name text="&P8_SITE_AFF. - Niveau du &P8_DATE_DEBUT. au &P8_DATE_FIN. - Pas de temps : &P8_TRUNC. (DD : Jour, HH24 : Heure, MI : Minute)" >
          <font type="Verdana" size="14" color="0x000000" align="center" />
          </name>
    <x_axis name="Niveau min : &P8_NIVEAU_MIN. m ngf - Niveau max : &P8_NIVEAU_MAX. m ngf - Niveau moyen : &P8_NIVEAU_MOYEN. m ngf" smart="yes" position="center_bottom" >
            <font type="Verdana" size="14" color="0x000000" bold="no" align="center" />
          </x_axis>
          <y_axis name="Niveau" smart="yes" position="left_center" >
            <font type="Verdana" size="14" color="0x000000" bold="no" align="center" />
          </y_axis>
          <grid>
            <values />
          </grid>
        </workspace>
        <legend enabled="no"/>
      </type>
      #DATA#
    </root>Thank you for your kind help.
    Christian

    Hi,
    I have a nice Candlestick flash chart and I am using Anychart 5.1.2. i would like to display 3 horizontal bar lines on this chart.
    The values on the y axis on these 3 bar lines are contained into 3 items. Do you have an idea on how to display these lines with the XML ? Here is the XML existing.
    <?xml version = "1.0" encoding="utf-8" standalone = "yes"?>
    <root>
      <type>
        <chart type="Candlestick">
          <animation enabled="no"/>
          <hints auto_size="yes">
            <text><![CDATA[{NAME}
    Niveau maxi: {HIGH}
    Niveau moyen: {OPEN}
    Niveau mini: {LOW}]]>
    </text>
            <font type="Verdana" size="10" color="0x000000" />
          </hints>
          <names show="yes" width="150" placement="chart" position="bottom" >
            <font type="Verdana" size="10" color="0x000000" />
          </names>
          <values show="no" prefix="" postfix=" m ngf" decimal_separator="." decimal_places="0" />
          <arguments show="no" />
          <candlestick_chart>
            <bulls>
              <background enabled="yes" color="White" />
            </bulls>
            <bears>
              <background enabled="yes" color="Black" />
            </bears>
          </candlestick_chart>
        </chart>
        <workspace>
          <background enabled="yes" type="solid" color="0xffffff" alpha="0" />
          <base_area enabled="no" />
          <chart_area enabled="yes" x="80" y="50" width="670" height="280" deep="0">
            <background enabled="no"/>
            <border enabled="yes" size="1"/>
          </chart_area>
          <name text="&P8_SITE_AFF. - Niveau du &P8_DATE_DEBUT. au &P8_DATE_FIN. - Pas de temps : &P8_TRUNC. (DD : Jour, HH24 : Heure, MI : Minute)" >
          <font type="Verdana" size="14" color="0x000000" align="center" />
          </name>
    <x_axis name="Niveau min : &P8_NIVEAU_MIN. m ngf - Niveau max : &P8_NIVEAU_MAX. m ngf - Niveau moyen : &P8_NIVEAU_MOYEN. m ngf" smart="yes" position="center_bottom" >
            <font type="Verdana" size="14" color="0x000000" bold="no" align="center" />
          </x_axis>
          <y_axis name="Niveau" smart="yes" position="left_center" >
            <font type="Verdana" size="14" color="0x000000" bold="no" align="center" />
          </y_axis>
          <grid>
            <values />
          </grid>
        </workspace>
        <legend enabled="no"/>
      </type>
      #DATA#
    </root>Thank you for your kind help.
    Christian

  • How to generate control limits in control chart

    I want to generate a X bar chart with control limits, sample size is Fix- 1.
    SPC criterion I selected is 020 ie Task List characteristics/ Material.
    1)Sampling Procedure I used- Fixed-1
    2)Valuation mode I used- Attrib non conforming units/ manual.
    3)Control chart I am using is 110- Shewart chart for X bar.
    But when I click for control limits in chart it is saying control limits for track 1 could not be calculated.
    Could anyone guide me, how to generate control limits for this graph. Sammple size will alwyas be 1.
    Please let me know should I change control chart type in this case.

    Hi Jaison,
    You should use valuation mode - SPC valuation in sampling procedure.
    Also you have to use sampling procedure with inspection points.
    as practically every hour or depending on the frequency decided we collect the measurements and calculate the SPC.
    now after correction in the sampling procedure create new inspection lot and check SPC.
    try out and revert.
    Regards,
    Anil

  • How to thicken the line in Line Chart?

    Post Author: leongcy23
    CA Forum: Charts and Graphs
    I created a line chart and everything is smooth. But there is one thing that I'm not satisfied, which is I can't thicken the line of the chart. I try to look for Help, but it didn't show anything. From what I explore and try, I only can enlarge the marker, but not the line.
    And another issue is, can I choose the color for the line? Because the report will auto generate the line with color that is not clear which is yellow which border me so much. I wonder is that I can choose the color of the line.
    I really appreciate for someone that offer help. Thanks
    Anson

    Post Author: rcoleman
    CA Forum: Charts and Graphs
    What version of Crystal are you using? I can click on the line to highlight and then right click to get the option to format line. You can then choose color and line thickness. I'm using Crystal XI. It may take a few trys to highlight the line.. you have to hit it just right but I can't imagine this wasn't available in earlier versions.

  • How to draw a line on chart

    Hi all,
    I am working on a chart in Design studio on BI platform. The following screen
    shot will depict the current state of my chart-
    Now
    I need to draw lines of different lengths and colors with certain distance from
    X-axis, as shown below. (I drew those lines on a screen shot of my chart with
    the help of MS paint
    but
    I need to do this with the help of design studio) . Basically I need help to
    get the following output in design studio. So, question is HOW TO DRAW A LINE
    IN DESIGN STUDIO?
    Kindly,
    help with this.
    Please suggest me to get the output.
    Thanks and Regards.
    Rakesh.

    Hi Tammy,
    Thanks for ur reply.
    I'm using DS 1.3. and no need of dynamic changes of line on chart.
    I just now gone through with CSS, but i didnt get the solution. i think somewhere im getting stuck with CSS.
    Can u please suggest me the step by step procedure to draw a line using CSS.
    Kindly help on this.
    Thanks and Regards,
    Rakesh

  • How do I create a stacked bar chart - Crystal Excelsius 4.5

    How do I create a stacked bar chart using Crystal Excelsius 4.5?  I do not see the stacked bar chart in my components window.  - Erik

    I just opened an old file that I created with Crystal Excelsius and I see the stacked bar chart visible in the components window of my old files.
    Why has stacked bar chart disappeared from the components window in my new files?  It seems many of the components have "disappeared" including stacked bar, candlestick charts, area charts and most of the background components.

  • Error Generating Chart

    Anyone know how to fix the error below.
    Trying to use the option to generate a chart from the pivot table controls.
    Error Generating Chart
    Assertion failure: nRequestedLayer < m_vLayerPositions.size() at line 979 of ./project/webcharts/chartdatatable.cpp
    Error Details
    Error Codes: OQ78YWIW

    Restart OC4J and check.
    It worked with me. I am using OBIEE 10.3
    manohar rana

  • Generating charts from jsp

    Hi there,
    i am a jsp novice and i am looking to generate chart using data in a dbase. can anyone point me in the right direction how to use JChart(in jsp) to generate chart from a database? I am looking to generate Barcharts and Line charts.
    it is my first attempt and i do not know where to start from. Any help would be greatly appreciated.
    thanks
    ravikiran
    mail : [email protected]

    hai man,
    will generating of the graphs take time... what will be the execution tie of a graph... for example if i want to generate the work performance of a team from the performance sheet i have and wanted it to be dynamically displayed( how much time it will take) since when I am doing the same in excel it is taking around 5 minutes to display the graph.will it take the same time when i use the technologies that were mentioned here ...
    i need ur help is it possible to generate the graphs online with dynamic data.
    SUGGEST ME ABOUT PROCEEDING FURTHER..
    THANKS
    RAVI

  • Cannot generate chart in PDF using BI Publisher

    I have a java program to generate chart in PDF using BI publisher. In some platforms the chart cannot be generated. Get the following exception.
    [061812_075947838][][ERROR] java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at oracle.apps.xdo.template.rtf.img.RTFChartUtil.invokeMethod(Unknown Source)
    at oracle.apps.xdo.template.rtf.img.RTFChartUtil.generateChartAsBase64(Unknown Source)
    at oracle.apps.xdo.template.rtf.XSLTFunctions.chart_svg(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at oracle.xdo.parser.v2.XSLExtFunctions.callStaticMethod(XSLExtFunctions.java:111)
    at oracle.xdo.parser.v2.XPathExtFunction.evaluateMethod(XPathExtFunction.java:307)
    at oracle.xdo.parser.v2.XPathExtFunction.evaluate(XPathExtFunction.java:226)
    at oracle.xdo.parser.v2.XSLValueOf.processAction(XSLValueOf.java:101)
    at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
    at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
    at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
    at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
    at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
    at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
    at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
    at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
    at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
    at oracle.xdo.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191)
    at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:512)
    at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:489)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:271)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:155)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(Unknown Source)
    at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
    at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
    at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
    at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
    at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
    at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
    at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
    at com.edocs.common.reporting.batch.BatchEventHandler.generatePDFFile(BatchEventHandler.java:327)
    at com.edocs.common.reporting.batch.BatchEventHandler.processBatchRequest(BatchEventHandler.java:252)
    at com.edocs.common.reporting.batch.BatchEventHandler.service(BatchEventHandler.java:136)
    at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.executeInternal(BatchReportProcessorTask.java:126)
    at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.doProcessTask(BatchReportProcessorTask.java:46)
    at com.edocs.pwc.tasks.CommonTask.processTask(CommonTask.java:166)
    at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.processTask(Unknown Source)
    at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NoSuchMethodError: oracle.dss.util.CustomStyle.<init>(Ljava/io/InputStream;)V
    at oracle.dss.graph.CommonGraph.setStyleStream(CommonGraph.java:10774)
    at oracle.dss.graph.CommonGraph.setStylePath(CommonGraph.java:10743)
    at oracle.dss.graph.CommonGraph.setStylePathXML(CommonGraph.java:12138)
    at oracle.dss.graph.CommonGraph.setXML(CommonGraph.java:13348)
    at oracle.dss.graph.CommonGraph._setXML(CommonGraph.java:15821)
    at oracle.dss.graph.CommonGraph.setXML(CommonGraph.java:14751)
    at oracle.dss.graph.Graph.setXML(Graph.java:5243)
    ... 60 more
    In office word bi publisher plugin, load the xml, the chart can be generated.
    The above exception only occurs in some linux and solaris platforms, but never occurs in windows.
    The following plateform throws exception.
    Oracle Linux Server release 5.6 + java version "1.6.0_25"
    The following plateform doesn't throw exception.
    Enterprise Linux Enterprise Linux Server release 5.4 (Carthage) + java version "1.6.0_05"
    The strange thing is in those platforms which can throw exception, if the code is not running in EJB, the chart still can be generated.
    In other words, if the normal web or standalone app invokes that program; the chart can be generated.
    The java code is as below.
         public static void generate(String inputXML, String pdfTempPath, String outputPDF) {
              Reader reader = null;
              try {
                   File xmlFile = new File(inputXML);
         reader = new BufferedReader(new InputStreamReader(new FileInputStream(xmlFile), "UTF-8"));               
              ByteArrayOutputStream tmpXSL = new ByteArrayOutputStream();           
              RTFProcessor rtfProcessor = new RTFProcessor(pdfTempPath);
                   rtfProcessor.setOutput(tmpXSL);
                   rtfProcessor.process();           
              ByteArrayInputStream in = new ByteArrayInputStream(tmpXSL.toByteArray());
              FOProcessor processor = new FOProcessor();
              processor.setData(reader);
              processor.setTemplate(in);
              processor.setOutput(outputPDF);
              processor.setOutputFormat(FOProcessor.FORMAT_PDF);           
              processor.generate();
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try {
                        if(reader!=null) {
                             reader.close();
                   } catch (Exception e) {
    Can anyone explain why this exception is thrown?
    Thanks a lot.

    Hello Tux Dueñas,
    I think you need to have ACL's setup in Oracle 11g in order to be able to connect to the BI Publisher server. Check the following link on how to setup ACL's in 11g...
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28300/afterup.htm#BABFCBJI
    Thanks,
    Machaan
    Edited by: Machaan on Jan 25, 2011 11:49 AM

  • Dynamically Generating Charts

    I need to be able to generate charts in APEX 3.01 from a SQL query which doesn't exist until it's built at runtime.
    The query is of the form:
    SELECT null link, x label, count(*) value FROM y table GROUP BY label, value ORDER BY 3 DESC
    x and y are the dynamically generated bits. I build the query using a PL/SQL anon block:
    DECLARE
    myquery VARCHAR2(4000);
    BEGIN
    myquery := 'select null link,';
    myquery := myquery || :P39_MYCHARTQUERY;
    myquery := myquery || ' label, count(*) value from ';
    myquery := myquery || :P39_MYCHARTTABLE;
    myquery := myquery || ' group by label, value';
    myquery := myquery || ' order by value desc';
    htp.print(myquery);
    END;
    The problem is, APEX charts will only accept a straight SQL query, not a PL/SQL block. I've tried putting the block into a hidden field (Display as Text, PLSQL version) and referencing it using substitution strings (&variable_name. style), but this doesn't seem to work. APEX is complaining about my generated SQL query:
    "Error in rendering chart: ORA-06561: given statement is not supported by package DBMS_SQL"
    The SQL looks correct. I have no idea what the problem is. Can anyone help?

    That's an interesting blog post. I'll have to dig around in SQL Workshop to see how to implement it. Modifying it to be multi-variable looks like it shouldn't be too difficult. Teaching myself about what packages are and how to use them will be the hard part.

  • Generating charts in batch

    Hi!
    I have the requirement to generate charts/graphs as image files in batch (hundreds of them in one batch). This chart images should be stored in table's blob column or in files on server's file system and later used for viewing on "static" web pages. This batch will be triggerd by cliking on button by a user or without user interaction from scheduler.
    How can ADF charts can be used for this purpose?
    So, is there any Java API for generating charts without GUI (like ChartDirector for JSP/Java http://www.advsofteng.com/cdjava.html)?
    Regards,
    Sašo Celarc
    Edited by: Sašo Celarc on Jun 22, 2011 2:37 AM

    I found the oracle.dss.graph.Graph (http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e12063/oracle/dss/graph/Graph.html). As understood this package exists behind ADF Charts? Am I right?
    Are there any useful examples how to use methods from this package?
    Sašo

  • Error Generating Chart on Windows XP professional

    Good day all,
    I do not understand why I can not create charts, I can view the data in tables and perform other operations but I cal not view charts using the available data.
    Any time i try it, the error comes up
    Error Generating Chart
    An error occurred during execution of "connect". No connection could be made because the target machine actively refused it.
    Error Details
    Error Codes: ETI2U8FA
    can anyone help out.

    The java host service was not started.

Maybe you are looking for