Suppression of nulls in Flash line graph

I am running APEX 3.0.1. I have an application that displays a 2D Flash line chart of a time series of 4 variables as 4 different colored lines. This works quite well. In some cases one of the variables is null (data is not yet available). Currently, my Flash chart shows the variable going to zero if that variable is null. Instead, I would like my chart of that variable to stop at the last reported value, showing a break in the line when the variable is null.
Any suggestions (custom XML, a chart setting change, etc) would be gratefully appreciated.
Alvin Steele

Alvin,
This was requested by several APEX users, and the behavior will be updated for APEX 3.1. In APEX 3.0.1, I don't think there's much you can do without generating the XML entirely yourself using a custom procedure or process.
You can check that 3.1 will work as you expect by testing on the Evaluation instance ( http://forums.oracle.com/forums/ann.jspa?annID=647)
- Marco

Similar Messages

  • Problems with Flash Line Graphs

    I have two problems with the new Flash Line Graphs in APEX 3.1
    1. I have created a query that returns a set number of rows. Sometimes the VALUE for a specific row might be null. When this occurs the LABEL data does not show up on the X axis. I want the LABEL data to show up no matter what. How do I accomplish this?
    2. Related to the above query. When the VALUE field is null for 3 records (or more) in a row, not only does the LABEL data for those records not display, the VALUE and LABEL data for the records that appear in the set after these 3 records also do not display. If one or even two null VALUE fields appears in a row, things are still OK. What do I need to do to get all my data to display?
    Any help would be appreciated.
    THANKS
    Raymond

    Raymond,
    For the Interactive report chart issue, could it be related to this?
    Re: Apex 3.1. Interactive Report. Questions and Problems.
    Interactive Report. Chart. Seems to be bug...
    - Christina

  • 2d Flash Line Graph Issues

    Hi,
    I am editing the xml for the 2d flash line graph, and having difficulty performing some customisations.
    Could anyone assist with the following:
    1) Changing the default line colours. I have 4 series. Changing the following does not change the line colours:
    <line_chart left_space="5" right_space="5">
    <block_names enabled="no" />
              <dots radius="1"/>
              <lines size="1" auto_color="no" color="blue"></lines>
              <lines size="1" auto_color="no" color="red"></lines>
              <lines size="1" auto_color="no" color="green"></lines>
              <lines size="1" auto_color="no" color="pink"></lines>
    </line_chart>
    2) Is there any way to add commas (thousands) to the Y axis labels?
    Many thanks for any assistance with these
    Steve

    Hi Ben,
    Yes I was looking at that, but just discovered that I can do the following:
    <values show="no" thousand_separator="," />
    and it seems to do it.
    I am now having REAL issues with the X and Y axis formatting. I am including font nodes inside the y_axis / x_axis nodes (as per anychart 3 docs) but the formating properties are not changing the axis labeling:
    <!--
    <y_axis name="Water Injected (&P320_UNITS.)" smart="yes" direction="horizontal" rotation="-90" position="left_center" >
    <font size="20" type="Verdana" color="" bold="" italic="" underline="" align="left"/>
    </y_axis>
    <x_axis name="" smart="no" direction="horizontal" rotation="-90" position="top">
    <font size="20" type="Verdana" color="" bold="" italic="" underline="" align="left"/>
    </x_axis>
    -->
    do you have any experience with doing this?
    thanks again
    Edited by: Steve_Macleod on May 14, 2009 3:18 PM

  • Represent NULL point in Line Graph.

    Hi;
          I am using Simple series to supply data to Graph type Line. I have a requirement to represent null data point in Line graph, where marker point for the NULL data point shouldn't be present, instead a straight line should come in between the valid points. Currently if the Data value is null, marker point is coming to 0.
    How can i solve this problem using Simple Series?
    I am using NW7.0; SP 9
    vinod.

    Please refer:
    http://www.sapdesignguild.org/resources/diagram_guidelines/index.html
    Reference Point:
         Chart Type Line Graph
             Do not Use it if the X axis has non-numeric values..
    vinod.

  • Flash line chart with multiple lines

    Here a newbie with apex...
    Created a flash line chart with as source the following sql statement:
    select null link, year, sum(total_cost) from cost
    group by year
    a chart has been created with a single line. i wanted every year on an own line.
    The way i could do this is with multiple series like:
    select null link, year, sum(total_cost) from cost
    where year =2008
    select null link, year, sum(total_cost) from cost
    where year =2009
    But this not a good solition, cause now i've to add every year a new serie
    hope to get some help from here... txn in advanced.

    tnx for your reply...
    I will explain myself more by a picture of the wanted result, see below:
    [Click here for the example image|http://img44.imageshack.us/img44/3444/grapha.jpg]
    In your reply you wright you think i can create the graph with pl/sql process. After seeing my example you still think that's needed?
    Hope you or some else can help... tnx in advanced.
    greetings

  • Line graph repeated values

    Hi,
    i have ploted the line graph which is like this select null,week_ending_date,effort from dual;
    Here the line is ploted but the labels are repeated
    eg:
    if the report is like this
    Weekending_date effort
    12-sep-08 8
    12-sep-08 9
    14-sep-08 10
    15-sep-08 11
    In the x-axis 12-sep-08 is repeated mutilple time based on the effort it is returning but we need the label to be repeated only once not multiple times also from the above example 12-sep-08 has 8,9 as the effort it must plot one obove the other if they are repeated with same label please suggest me how to resolve this
    Thanks
    Sudhir.

    Hi Sudhir,
    try your query like this -
    select null "Link", week_ending_date "Week ending", effort "Effort" from table_name;
    it should work, i m currently using same sort of query for flash chart.
    Hope this will help.
    Thanks,
    M Tajuddin
    http://tajuddin.whitepagesbd.com

  • SVG line graph

    Hi,
    Can we customize the line graph. i have a query like this
    SELECT
    NULL,
    "Object Name",
    TRUNC(BSV,2)
    FROM BSV_RSV_VIEW
    WHERE
    PRO_ID = :P2_PROJECTS
    which generates a line graph i need to add a line in the graph, line which is having two limits some thing like example 10 and -10 in the graph which lie in x-axis can we do that if so please suggest
    thanks
    Sudhir

    Hello Sudhir,
    Is there a specific reason why you're using an svg line graph and not the new Flash ones?
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://apex-evangelists.com/
    -- http://apexblogs.info/

  • Animating a line graph

    Dear javafx coders
    I am a physics teacher in London and I am trying to learn JFX so that I can make animations for use in lessons. I don't know much about programming, but so far I have successfully managed to animate a circle which oscillates up and down (please see code below):
    package javafxapplication22;
    import javafx.stage.Stage;import javafx.scene.Scene;
    import javafx.scene.Node;import javafx.scene.shape.Circle;
    import javafx.animation.Timeline;import javafx.animation.KeyFrame;
    import javafx.scene.input.*;import javafx.animation.*;
    import javafx.scene.*;import javafx.animation.transition.*;
    import javafx.scene.shape.*;import javafx.scene.paint.*;
    import javafx.scene.transform.*;import javafx.stage.*;
    import javafx.scene.control.*; import javafx.scene.text.Text;*
    *import javafx.scene.Scene;import javafx.scene.text.Text;*
    *import javafx.scene.text.Font;*
    *var yold:Number=100; //old y pos*
    *var ynew:Number=100; //new y pos*
    *var yvel:Number=5; //y velocity*
    *var yacc:Number=0; // y acceleration*
    *var freq=0.001; //frequency of oscillation*
    *var time = Timeline {*
    *repeatCount: javafx.animation.Timeline.INDEFINITE // never stop*
    *keyFrames: for (i in [30..40])*
    *javafx.animation.KeyFrame*
    *time: 100ms*indexof i // each frame is 100ms apart*
    *action: function ()*
    *yacc=-39.48*freq*(yold-100); //calculate acceleration
    yvel=yvel+yacc; //update velocity
    ynew=yold+yvel; //update position
    MoveTo {x: 200+i*10 y: yold absolute: false} //graph from old position ...
    LineTo {x: 200+(i+1)*10 y: ynew absolute: false} //..to new
    yold=ynew;
    Stage {
    scene: Scene {
    width: 400
    height: 200
    content: [
    Circle {
    centerX: 100;
    centerY: bind ynew,
    radius:20,
    onMousePressed: function(e:MouseEvent) { time.play(); }
    } The circle behaves as expected and oscillates up and down. However, I would also like to graph its motion beside it (using moveTo and lineTo, you can see these two lines above) but no lines at all appear on the screen. The idea is that on each new frame a portion of the line graph is added (i.e. from the old y position to the new y position, also adding on an equal x increment each time as we move along the time axis.
    Any help on this would be really appreciated - I am very keen to move away from technologies such as Flash, but at the moment I am finding JFX a bit difficult.
    Thank you
    Matt Klein

    aheem...well! then how about this animation...I think I know what you are trying to do then. If I'm not mistaken, you are trying to do what the Ti-83 can do when graphing.
    Well! here is an idea on how I would do a simple animation on a graph
        This is an animation graph
    package animationgraph;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.chart.LineChart;
    import javafx.scene.chart.part.NumberAxis;
    import javafx.animation.Timeline;
    import javafx.animation.KeyFrame;
    * @author JJ
    //The start values of x & y for line 1
    var line1StartX : Number = 8;
    var line1StartY : Number = 10.2;
    //The end values of x & y for line 1
    var line1EndX : Number = 0;
    var line1EndY : Number = 0;
    //The x & y values for line 2
    var line2X : Number = 0;
    var line2Y : Number = 0;
    //Creates a line chart
    var getLineChart =  LineChart
         title: "Line Chart"
         xAxis: NumberAxis {
              lowerBound: 8
              upperBound: 9.1
         yAxis: NumberAxis {
              lowerBound: 0
              upperBound: 30
         data: [
              LineChart.Series {
                   name: "Line 1"
                   data: [
                        LineChart.Data { xValue: bind line1StartX  yValue: bind line1StartY}
                        LineChart.Data { xValue: bind line1EndX yValue: bind line1EndY }
    //Keeps track the time for line 1
    var keepTime1 : Number = 6;
    //Animation for the line chart
    var line1Animation = Timeline
         keyFrames: KeyFrame
                time:1s
                action:function()
                    keepTime1--;
                    if(keepTime1==5)
                        line1EndX = 8.1;
                        line1EndY = 10.5;
                    if(keepTime1==4)
                        line1EndX = 8.3;
                        line1EndY = 11.0;
                    if(keepTime1==3)
                        line1EndX = 8.5;
                        line1EndY = 11.5;
                    if(keepTime1==2)
                        line1EndX = 8.7;
                        line1EndY = 13.0;
                    if(keepTime1==1)
                        line1EndX = 9;
                        line1EndY = 15.5;
           repeatCount:5
    Stage {
        title: "Animation Graph"
        scene: Scene {
            width: 500
            height: 500
            content: [
                getLineChart
    line1Animation.play();

  • Multi line graph values issue

    Hi,
    I am using JDev 11.1.2.2.0
    I made a standard line graph which I populate with data through a backing bean.
    I read a post on how to put points to the graph:
    ArrayList <Object[]> data;
    Object[0] -> x axis data, here I have dates
    Object[1] -> name of the serie, a new serie is created for each different name
    Object[2] -> y axis data, here I have values
    Then I put the list to the graph and it works fine, only for one serie.
    When I display 2 or more series, the graph shows the different series in different colors as it is suposed to do.
    But, the values (Y axis) are not displayed at the correct place. I mean for instance the point with value 4K is displayed below the 3K Y axis marker...
    And sometimes the point is displayed above as its real value...
    So my graph is false, but my values are correct (I tested it)
    Then what can I do? The graph can draw several lines as I managed to put more than one serie. The only problem is that they are not displayed properly...
    (if you need the code I can show it)
    Edited by: Jikai on 20 sept. 2012 16:51

    Ok, I found what was wrong.
    In the graph properties the subType field was set to LINE_VERT_STACK, then I changed it to default (LINE_VERT_ABS) and it worked.
    <dvt:lineGraph id="lineGraph" subType="*LINE_VERT_ABS*"
    binding="#{backingBeanScope.backing_ReportingPopUp.lineGraph}" shortDesc="Graph that shows metrics"
    inlineStyle="height:100%; width:100%;" imageFormat="FLASH">
    <dvt:background>
    <dvt:specialEffects/>
    </dvt:background>
    <dvt:graphPlotArea/>
    <dvt:seriesSet>
    <dvt:series/>
    </dvt:seriesSet>
    <dvt:o1Axis/>
    <dvt:y1Axis/>
    <dvt:legendArea automaticPlacement="AP_NEVER"/>
    <dvt:graphTitle text="Metrics for Hosts by Date" horizontalAlignment="CENTER"/>
    </dvt:lineGraph>

  • ADF Line Graph with dynamic series - can do ?

    I want to implement a drill-down from a high level line graph into a lower level line graph. The master graph may have 4 series in it, and each of these 4 series may have 6 - 8 different sub-series that need to be shown in the lower level graph (so up to 30 in all sub-series). Rather than create 4 of the lower level graphs, what I'd like to be able to do is create the lower level graph once using a VO which reads the master graph context. The definition of a graph model however in the ADF at first glance doesn't appear to cater for this. Have others done this ?
    Thinking that if I could:
    a) define the detail VO so that it used generic columns for the series amounts
    b) was able to override the series attribute name/label used for the legend etc. by way of code (backing bean?) for each series again based on context
    c) was able to optionally hide a series that was not needed (as defined by the generic detail VO) for a given master context
    ... then maybe I'd have a chance. But b) and c) don't look catered for.
    Anyone?
    Using 11.1.

    For the record, I gave this a go, and was able to get it working satisfactorily. There was no way as far as I could tell to set the visibility of a series. So essentially, what I've been able to do is set the series label to blank, set the line width to 1 (min, doesn't seem to honor 0), and the color to white to match the background of the chart ... for those series that are superfluous in a given chart render. It works fine except for the fact that if you've used the highlight rollover series effect, if you move the mouse over the legend area where the "hiding" series are, you get a bit of flashing on the legend entries that are displayed.
    Ideally, we'd have a way of actually taking these out entirely. If there's a way to do it, I'd be interested in hearing about it.
    Thanks.

  • ClickListener in ADF Line graph

    Hello,
    Is it possible to get the x-axis and y-axis values (i.e.coordinates) of the line graph if user clicks in a line area between points (not the point itself)?
    I can get the x-axis and y-axis values if I click on point in a line as follows:
        public void graphClickListener(ClickEvent clickEvent)
            ComponentHandle handle = clickEvent.getComponentHandle();
            if (handle instanceof DataComponentHandle)
                DataComponentHandle dhandle = (DataComponentHandle)handle;
                Object val = dhandle.getValue(DataComponentHandle.UNFORMATTED_VALUE);
                Date timeVal = null;
               Attributes[] seriesInfo = dhandle.getSeriesAttributes();
                if (seriesInfo != null && seriesInfo.length > 0)
                    Object seriesName = seriesInfo[0].getValue(Attributes.LABEL_VALUE);
                       Attributes[] groupInfo = dhandle.getGroupAttributes();
                        if (groupInfo != null && groupInfo.length > 0)
                            Object timeObj = groupInfo[0].getValue(Attributes.LABEL_VALUE);
                            if (timeObj != null)
                                timeVal = new Date(((Date)timeObj).getTime());
    //However when I click on a line area between the points (not the point itself) then I can get only the series name information, not the x-axis and y axis value:
            else if (handle instanceof SeriesComponentHandle)
                // Get the series attributes
                Attributes[] seriesInfo = ((SeriesComponentHandle)handle).getSeriesAttributes();
                String data = "";
                if (seriesInfo != null)
                    for (Attributes attrs : seriesInfo)
                        data += "\nSeries value: " + attrs.getValue(Attributes.LABEL_VALUE);
                        data += "\nSeries name: " + attrs.getValue(Attributes.LABEL_ATTRIBUTE);
                        data += "\nSeries value id: " + attrs.getValue(Attributes.ID_VALUE);
                        data += "\nSeries name id: " + attrs.getValue(Attributes.ID_ATTRIBUTE);
                System.out.println(data);
    Following is the source of the jsf file:
              <dvt:graph id="lineGraph1" animationOnDisplay="auto"
                         tabularData="#{pageFlowScope.gaphPageStateBean_backing.graphTabularData}"
                         customToolTipCallback="#{pageFlowScopegraphPageStateBean_backing.callback}"
                         graphType="LINE_VERT_ABS"
                         seriesObjectCount="#{pageFlowScope.graphPageStateBean_backing.seriesCount}"
                         timeRangeStart="#{pageFlowScope.graphPageStateBean_backing.graphStartDate}"
                         timeRangeEnd="#{pageFlowScope.graphPageStateBean_backing.graphEndDate}"
                         timeAxisInterval="CTAI_MINUTE" timeRangeMode="TRM_EXPLICIT"
                         partialTriggers="::commandLink1 ::t1:cb7"
                         binding="#{backingBeanScope.graphPageBean_backing.graphBinding}"
                         clickListener="#{backingBeanScope.graphPageBean_backing.graphClickListener}"
                         timeAxisType="TAT_IRREGULAR" textAntialiasing="true"
                         scrollListener="#{backingBeanScope.graphPageBean_backing.scrollListener}"
                         zoomListener="#{backingBeanScope.graphPageBean_backing.zoomListener}"
                         markerTooltipType="MTT_VALUES_TEXT">
                <dvt:background/>
                <dvt:graphPlotArea/>
                <dvt:seriesSet defaultLineWidth="3" defaultMarkerColor="#ffffff"
                               seriesMap="#{pageFlowScope.graphPageStateBean_backing.lineGraphSeriesMap}"
                               markerDisplayed="true"
                               defaultMarkerShape="MS_CIRCLE"/>
                <dvt:o1Axis id="rhrhtr6" scrolling="on"/>
                <dvt:y1Axis id="fwef43" lineWidth="1" axisMaxValue="1.0"
                            axisMinValue="0.0" logarithmicBase="10"/>
                <dvt:legendArea automaticPlacement="AP_NEVER" rendered="false"/>
                <dvt:o1TickLabel id="o1TickLabel1" tickLabelSkipCount="50"
                                 tickLabelSkipMode="TLS_MANUAL"
                                 tickLabelSkipFirst="0"/>
                <dvt:y1MajorTick id="y1MajorTick1"
                                 tickStyle="#{pageFlowScope.gaphPageStateBean_backing.YAxisTickLine}"/>
                <dvt:y1TickLabel rendered="false"/>
                <dvt:shapeAttributesSet id="shapeAttribSet1">
                  <dvt:shapeAttributes component="GRAPH_AREAMARKER" clickable="true"
                                       id="shapeAttrib1"/>
                </dvt:shapeAttributesSet>
                <dvt:timeAxisDateFormat timeFormat="HOUR24_MINUTE"
                                        yearFormat="YEAR_LONG"
                                        monthFormat="MONTH_SHORT"
                                        quarterFormat="NONE"/>
                <dvt:o1Title text="Time:" horizontalAlignment="LEFT">
                  <dvt:graphFont id="graphFont1" underline="true" color="#002173"/>
                </dvt:o1Title>
                <dvt:annotationSet annotationMap="#{pageFlowScope.graphPageStateBean_backing.graphAnnotationMap}"/>
              </dvt:graph>
    Thank you.
    Valon
    Jdeveloper 11.1.1.5.0
    af:graph

    I use af:graph instead of af:lineGraph because the tooltip needs some special customization which af:lineGraph doesn't support.
    Just for the sake of the question, I converted the graph to af:lineGraph and I set clickListener in dvt:shapeAttributes as well. It didn't make any difference.
    When I click in a line area outside of a point the clickListener gets invoked, however it is not useful since I cannot obtain x and y coordinates.
    It goes in the else if section of the code i provided on top of this page. I.e. else if (handle instanceof SeriesComponentHandle) {............}.
    My question remains un-answered yet.
    Thank you,

  • Exporting from a 2D line graph with .jpeg extension

    Is there any way to export from an ordinary 2D line graph with .jpeg extension so that with using this image i will improve my result of exporting excel.
    e.g. i have found and example and added a button as you will see when you run this code.I will click this button and it will export this line graph with extension .jpeg so that i will see it as an ordinary image at my home directory.
    Thanks for any helpful comment
    Regars,
    Serhat
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * @author led1433
    import java.awt.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class LineGraph
        public static void main(String[] args)
            int x1 = 1000,y1 = 0;
            JFrame f = new JFrame();
            JButton exportToJPegButton = new JButton("EXPORT WITH JPEG");
            exportToJPegButton.setToolTipText("Exports Graph with extension *jpeg");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            exportToJPegButton.setSize(200,25);
            f.add(exportToJPegButton).setLocation(x1, y1);
            f.getContentPane().add(new GraphPanel());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class GraphPanel extends JPanel
        final int
            HPAD = 60,
            VPAD = 40;
        int[] data;
        Font font;
        public GraphPanel()
            data = new int[] {
                120, 190, 211, 75, 30, 290, 182, 65, 85, 120, 100, 101
            font = new Font("lucida sans regular", Font.PLAIN, 16);
            setBackground(Color.white);
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setFont(font);
            FontRenderContext frc = g2.getFontRenderContext();
            int w = getWidth();
            int h = getHeight();
            // scales
            float xInc = (w - HPAD - VPAD) / 11f;
            float yInc = (h - 2*VPAD) / 10f;
            int[] dataVals = getDataVals();
            float yScale = dataVals[2] / 10f;
            // ordinate
            g2.draw(new Line2D.Double(HPAD, VPAD, HPAD, h - VPAD));
            // tic marks
            float x1 = HPAD, y1 = VPAD, x2 = HPAD - 3, y2;
            for(int j = 0; j < 10; j++)
                g2.draw(new Line2D.Double(x1, y1, x2, y1));
                y1 += yInc;
            // labels
            String text; LineMetrics lm;
            float xs, ys, textWidth, height;
            for(int j = 0; j <= 10; j++)
                text = String.valueOf(dataVals[1] - (int)(j * yScale));
                textWidth = (float)font.getStringBounds(text, frc).getWidth();
                lm = font.getLineMetrics(text, frc);
                height = lm.getAscent();
                xs = HPAD - textWidth - 7;
                ys = VPAD + (j * yInc) + height/2;
                g2.drawString(text, xs, ys);
            // abcissa
            g2.draw(new Line2D.Double(HPAD, h - VPAD, w - VPAD, h - VPAD));
            // tic marks
            x1 = HPAD; y1 = h - VPAD; y2 = y1 + 3;
            for(int j = 0; j < 12; j++)
                g2.draw(new Line2D.Double(x1, y1, x1, y2));
                x1 += xInc;
            // labels
            ys = h - VPAD;
            for(int j = 0; j < 12; j++)
                text = String.valueOf(j + 1);
                textWidth = (float)font.getStringBounds(text, frc).getWidth();
                lm = font.getLineMetrics(text, frc);
                height = lm.getHeight();
                xs = HPAD + j * xInc - textWidth/2;
                g2.drawString(text, xs, ys + height);
            // plot data
            x1 = HPAD;
            yScale = (float)(h - 2*VPAD) / dataVals[2];
            for(int j = 0; j < data.length; j++)
                y1 = VPAD + (h - 2*VPAD) - (data[j] - dataVals[0]) * yScale;
                if(j > 0)
                    g2.draw(new Line2D.Double(x1, y1, x2, y2));
                x2 = x1;
                y2 = y1;
                x1 += xInc;
        private int[] getDataVals()
            int max = Integer.MIN_VALUE;
            int min = Integer.MAX_VALUE;
            for(int j = 0; j < data.length; j++)
                if(data[j] < min)
                    min = data[j];
                if(data[j] > max)
                    max = data[j];
            int span = max - min;
            return new int[] { min, max, span };
    }

    GraphPanel stays the same.
    public class JpegExport {
        public static void main(String[] args) {
            final GraphPanel graphPanel = new GraphPanel();
            JButton exportToJPegButton = new JButton("EXPORT WITH JPEG");
            exportToJPegButton.setToolTipText("Exports Graph with extension *jpeg");
            exportToJPegButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    exportToJpeg(graphPanel);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(exportToJPegButton, BorderLayout.NORTH);
            f.getContentPane().add(graphPanel, BorderLayout.CENTER);
            f.setSize(400, 400);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        private static void exportToJpeg(GraphPanel graphPanel) {
            try {
                int w = graphPanel.getWidth();
                int h = graphPanel.getHeight();
                BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
                Graphics2D g2 = image.createGraphics();
                graphPanel.paint(g2);
                g2.dispose();
                ImageIO.write(image, "jpeg", new File("export.jpg"));
            } catch (IOException e) {
                e.printStackTrace();
    }

  • Two line graphs in a single chart

    Hello Experts,
    I am having set of values each for one line graph.
    But I want to plot these two graphs in a single chart.(2 line graphs in a single chart)
    Please help me how to plot?
    Regards,
    Apex User

    Hi,
    Your query needs to return data in this format:
    link    label        value1   value2
    null    01-JAN-10    5        6
    null    01-FEB-10    3        6
    null    01-MAR-10    2        5where 'value1' column will be the first series, 'value2' column will be the second series, etc.
    So you SQL query will need to be something like:
    select
    null link,
    created_month label,
    sum(value1) value1,
    sum(value2) value2
    from table
    group by
    created_monthAmanda

  • Line Graph Error

    Hi,
    I have a query like this below which will return 25 rows when i run this in a SQL work shop when i execute this in Line graph it only shows data for 15 rows remaining 10 rows are missing please suggest me what would be the mistake
    Here no dates are repeated. i see lines only for 15 rows remaining 10 are missing this is happening if the data is 15 rows the limit for line graph or some changes can be made.
    SELECT
    null,
    TP.WEEK_ENDING_DATE "Week Ending Date",
    SUM(TCL.NUM_HOURS_DAY1+TCL.NUM_HOURS_DAY2+TCL.NUM_HOURS_DAY3+TCL.NUM_HOURS_DAY4+TCL.NUM_HOURS_DAY5+TCL.NUM_HOURS_DAY6+TCL.NUM_HOURS_DAY7) "Total Actual"
    FROM
    timecard_lines tcl,
    project_objects pobj,
    tasks tas,
    projects pro,
    timecard_headers thr,
    employees epl,
    TIMECARD_PERIODS TP
    WHERE
    PRO.ID = :P67_PROJECTS AND
    TP.ID = THR.TPD_ID AND
    tcl.pobj_id = pobj.id AND
    tcl.tas_id = tas.id AND
    pro.id = pobj.pro_id AND
    thr.id = tcl.thr_id AND
    thr.emp_id = epl.id AND
    pobj.id = tcl.pobj_id
    AND
    pro.id in
    (SELECT pro.id
    FROM projects pro, employee_project_pairs
    epp, project_employee_roles per ,employees empl
    WHERE empl.id = epp.emp_id
    AND pro.id = epp.pro_id
    AND epp.project_role_id = per.id )
    GROUP BY pro.project_name,TP.WEEK_ENDING_DATE
    order by TP.WEEK_ENDING_DATE asc
    Thanks
    Sudhir

    Hi,
    You can't adjust the chart dimensions dynamically without constructing the whole thing dynamically. You can set "Use Custom XML" to Yes and then change the Height and Width settings of the chart_area tag. Labels can be rotated by setting "Labels Rotation" in the Display Settings section of the Chart Attributes to either 90 or 270.
    Andy

  • Line Graph - 0 quantity display

    All,
    The requirements for my line graph are as follows:
    -Map the data to the graph based on hours and quantity. 
    -When the quantity is 0 - break the line.   The line should not dip down to 0 and back up to the quantity.   The line should stop at that point, and then continue on the next non-zero point.
    I'm not sure how to stop the plotting on the graph when the quantity is 0.
    Any ideas?
    Thank you,
    Michelle

    Hi, Michelle.
    The best way to achieve this would be to use either a SQL query or xMII's Business Logic Services to "transform" your dataset, replacing zero (0) values with NULL (SQL) or NA (xMII) values.  This will give you the desired result.
    If the data source is not SQL, you can do it with BLS.
    Rick

Maybe you are looking for

  • I have a new computer with Windows 7 and get an error message 7 when trying to install iTunes 64 bit

    I have a new PC with Windows 7 and when I try to download iTunes, 64 bit I get Error 7 (Windows error 127).  Any help would be appreciated

  • I have an E_ADEPT_NO_TOKEN error. Please help

    When trying to download, the computer goes into digital editions and then this error appears. I have tried uninstalling and re-installing.

  • Messages on status bar

    Hi friends, Thanks in advance. Can we hide or suppress the messages displayed on the status bar .

  • Need urgent help on ALV dropdown

    Hi experts, I have posted this before but was not able to get much feedback. I urgently need some feedback about this. I had a dropdown in one of my grid's column. It was done in OO way using fieldcatalog DRDN_FIELD. I want to know is it possible to

  • DB Read Step

    Hi How can I run a query with DB read step in UCCX to fetch information from DB only if the variable contains certain value[s]. For example in SQL I would use the statement select * from DB where phone1 like '%234%' would return all records that cont