Line graph with single values as dots

Dear Apex experts,
I have the requirement to create a graph in Apex which displays technical values as dots or candles and limit values and average values as lines in one graph.
Is there a way to create two types of graphs in one image ?
Best regards,
Daniel

Hi,
as far as I know, you can't have interruptes series in the DVT line graph
Frank

Similar Messages

  • Creation of Variable with single values in BPS

    Dear All,
    I have a very basic requirement in creating variables that would accept single values from the user in BPS.
    Could anyone pls provide me the steps in doing so?
    I am able to create and use varibles with value ranges but could not find the option to create variables with  single values.
    Regards,
    Srini.

    Hi Raj,
    I have already been  thru SAP help file but,  though it says we can create variables with single values, it does not  provide any steps in creating it.
    Any suggestions?
    Regards,
    Srinivas Kamireddy.
    Edited by: Srinivas Kamireddy on Apr 25, 2008 7:59 PM

  • 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();
    }

  • Creating multiple Line Graph having common values..

    Hi...
    I've created one application process for creating Multiple Line Graph.
    And i've integreted two tables in this graph, where values may be common for both the tables. In this case, for common values, instead of getting overlapped I'm getting scattered graph(its totally abnormal). Please help me if you 've any idea about this issue.....?
    Please go through the App Process and the output of the SQL query.
    In output of the query, in the NAME column "Feb-2010" is common.
    This is the SQL query OUTPUT:_
    TABLE 1
    NAME VALUE
    Sept-2009 100
    Oct-2009 95
    Nov-2009 98
    Feb-2010 97
    TABLE 2
    NAME VALUE
    Jan-2010 93
    Feb-2010 100
    Mar-2010 98
    Application Process :_
    DECLARE
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    OWA_UTIL.http_header_close;
    HTP.p ('<?xml version = "1.0" encoding="utf-8" standalone = "yes"?>');
    HTP.p ('<anychart>');
    HTP.p ('<settings>');
    HTP.p ('<animation enabled="True"/>');
    HTP.p ('</settings>');
    HTP.p ('<charts>');
    HTP.p ('<chart plot_type="CategorizedVertical">');
    HTP.p ('<data_plot_settings default_series_type="Line">');
    HTP.p ('<line_series>');
    HTP.p ('<marker_settings>');
    HTP.p ('<marker type="None" />');
    HTP.p ('<states>');
    HTP.p ('<hover>');
    HTP.p ('<marker type="Diamond" />');
    HTP.p ('</hover>');
    HTP.p ('</states>');
    HTP.p ('</marker_settings>');
    HTP.p ('<tooltip_settings enabled="True">');
    HTP.p ('<format>Year {%Name}{enabled:false} {%SeriesName} - {%Value}{numDecimals:0}%</format>');
    HTP.p ('</tooltip_settings>');
    HTP.p ('<effects enabled="True">');
    HTP.p ('<drop_shadow enabled="False" />');
    HTP.p ('<bevel enabled="true" distance="1" blur_x="2" blur_y="2" />');
    HTP.p ('</effects>');
    HTP.p ('<line_style>');
    HTP.p ('<line thickness="3" /> ');
    HTP.p ('</line_style>');
    HTP.p ('</line_series>');
    HTP.p ('</data_plot_settings>');
    HTP.p ('<chart_settings>');
    HTP.p ('<title enabled="true">');
    HTP.p ('<text>Avg. %App. Uptime per month </text>');
    HTP.p ('</title>');
    HTP.p ('<axes>');
    HTP.p ('<y_axis>');
    HTP.p ('<title>');
    HTP.p ('<text>Value</text> ');
    HTP.p ('</title>');
    HTP.p ('<scale minimum="90" maximum="101" major_interval="1" />');
    HTP.p ('<labels>');
    HTP.p ('<format>${%Value}{numDecimals:0}</format>');
    HTP.p ('</labels>');
    HTP.p ('<axis_markers>');
    HTP.p ('</axis_markers>');
    HTP.p ('</y_axis>');
    HTP.p ('<x_axis tickmarks_placement="Center">');
    HTP.p ('<title enabled="False" /> ');
    HTP.p ('</x_axis>');
    HTP.p (' </axes>');
    HTP.p ('</chart_settings>');
    HTP.p ('<data>');
    FOR ObjRecord IN (select DISTINCT(K_OBJECT.OBJECT_ID) as OBJECT_ID,name from K_OBJECT, K_OBJ_TYPE_ASP_REL where K_OBJECT.OBJECT_ID=K_OBJ_TYPE_ASP_REL.OBJECT_ID and K_OBJ_TYPE_ASP_REL.OBJECT_TYPE_ID=1)
    LOOP
    HTP.p ('<series name="'|| ObjRecord.name ||'">');
    FOR MonthlyValueRecord IN (select NAME,VALUE
    from K_REPORT_RUN,K_ASPECT_VALUES,K_ASP_TIM_RPT_REL
    where K_REPORT_RUN.RUN_ID=K_ASP_TIM_RPT_REL.RUN_ID
    and
    K_ASPECT_VALUES.ASPECT_VALUE_ID=K_ASP_TIM_RPT_REL.ASPECT_VALUE_ID
    and
    K_ASP_TIM_RPT_REL.ASPECT_ID=1
    and
    K_ASP_TIM_RPT_REL.OBJECT_ID=ObjRecord.OBJECT_ID
    order by K_REPORT_RUN.STARTTIME)
    LOOP
    HTP.p ('<point name="'|| MonthlyValueRecord.name ||'" y="'|| MonthlyValueRecord.value ||'" />');
    END LOOP;
    HTP.p ('</series>');
    END LOOP;
    HTP.p ('</data>');
    HTP.p ('</chart>');
    HTP.p ('</charts>');
    HTP.p ('</anychart>');
    htmldb_application.g_unrecoverable_error := true;
    END;
    Edited by: user12873839 on Apr 9, 2010 3:58 AM
    Edited by: user12873839 on Apr 9, 2010 4:02 AM
    Edited by: user12873839 on Apr 9, 2010 8:00 AM

    >
    Help Needed Urgent.....
    >
    That is one surefire way to not get any help and certainly not urgently. I suggest that you amend the title of your post to something that reflects the actual issue. This will also help anyone with similar issues to find the thread.
    When posting code please put {noformat}{noformat} (with the curly brackets and the word code in lower case) above and below it to preserve formatting like this...
    {noformat}{noformat}
    SELECT *
    FROM emp
    {noformat}{noformat}
    This will be displayed on the forum like this...SELECT *
    FROM emp
    Cheers
    Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Producing a line graph of int values and saving as an image

    Hi,
    I wonder if anyone could help me with this. I have 2 arrays of integer values that I would like to plot as a line graph (e.g. X[ ] and Y [ ]) and then have this line graph saved as an image (the format isn't too important but PNG would be preferred).
    Could somone point me in the right direction of an easy way to do this?
    Thanks,
    Pete

    Have a look at the following classes :
    java.awt.Graphics (drawLine method)
    java.awt.Image
    java.awt.BufferedImage
    javax.imageio.ImageIO (jdk 1.4+)

  • Line Graph  X-axis Value

    Hi ,
    I Created line graph in ADF X axis - date , Y axis Amount and Currency Mixed Frequency Line graph
    For ex : X - axis dates are 01-jan-2011 to 10-jan-2011
    y - axis are amount and currency
    when i click particular currency line (on 05-jan-2011) how i will get the x axis value 05-jan-2011
    Thanks
    Shk

    Check the range against which line is plotted, you may have to reduce that range to see accurate values.

  • Multiplot graph with missing values fills them with zero instead of NaN

    I have a waveform graph with multiple arrays (2D) which has different numbers of points in each array.  LabVIEW finds the array with the most points and then plots all arrays with that many points.  It assigns the missing points a value of zero and displays those zero values.  This means arrays with fewer points than the maximum will have values of zero appear in their plots.  This can be avoided by filling in missing points with NaN.  I am acquiring data in a loop and displaying it which requires continuous determination of the number of actual points and filling in of missing points with NaN.  Not difficult, but this could be avoided if LabVIEW would fill missing points with NaN instead of with zero.  Any way to have this happen automatically ?
    Steve
    Attachments:
    Graph MultiPlot Missing Data.vi ‏18 KB

    You can also consider using an XY graph so you don't have to do additional data manipulation. See attached for comparison.
    Attachments:
    Graph MultiPlot Missing Data mod.vi ‏22 KB

  • Create graphs with properties values

    Hello!
    I want to create a Bar Graph or a normal graph with properties contained in ChannelGroup level. Is there any easy solution to this?, so far is seems that the only option is to create a channel with this values, but I don't want to duplicate the information since I have a considerable number of channels in each Channel Group.
    Thanks in advance for the support!

    hello!
    I know that you can get even the values or whathever property live values, name, etc. with the expresion form "@@ @@". However I want to plot, for example a bar graph that contains a numeric property of the group. Let's say that I have 3 Datasets all with a property "TotalFuel" and different values in each group, So what I will like to do is to plot this values in a 2DAxis object.  But it seems that all the plots or graphs are meant to be only channel oriented.
    Do you understand my issue? Please let me know if not to clarified better this.
    Thanks!

  • 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.

  • Line Graph with Multiple Series not displayed(Install Missing Plugins)

    Hi All,
    I have created a Graph - Line Graph.
    I have created more then one Series.
    The graph is not being displayed, it asks to download missing plugins.
    Where as when I have a singe chart series the graph is displayed.
    What are the missing plugins, where can I find those.
    I am using Mozilla 5.0.
    Regards
    Arif Khadas

    Please Help!

  • Can I draw a k-line graph with jfreechart for a Mac app on 10.8?

    Hi,
      I want to draw a k-line graph on mac, and I haven't find a lib better than jfreechart on doing that work until now, so how can I use it in xcode?
    Regards

    I believe this version works in 10.6.8.
    http://support.apple.com/kb/DL1507

  • Line chart with mutiple value formats

    Hi,
    I have a chart built with Crystal Reports 2008 with two column lines.  One of the lines represents Quantity and the other line represents Percentage.  I set two Y axis (Y1 for Quantity line and Y2 for Percentage) for the two lines.  My problem is that when I set one of the lines' value format as Percentage, value format of both lines become percentage.  I cannot set one of the line value formats as percentage and the other one as number.  Would you please advise how I can set one of the line's value format on the chart as numbers and the other one as percentage?
    Thanks,
    Al

    Hello Al,
    How exactly are you setting one of the lines' value format as Percentage?
    And what are you setting it to be a percentage of? or are you trying to dsiaply one series data labels with a percentage symbol?

  • Barchart with single value

    Hello.
    I would like to know why, when I provide to my barchart component a data provider with only one value, the height of the corresponding bars is scaled to about 1 pixel. However if I add a second value, even null, the height become correct again.
    Thanks.

    There is the result of the code below
    <?xml version="1.0" encoding="utf-8"?><s:Application 
    xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768">
         <fx:Script>
         <![CDATA[
              private var dataProvider:Array = [{value:10}];
         ]]> 
         </fx:Script>
         <mx:BarChart dataProvider="{dataProvider}">  
              <mx:series>
                   <mx:BarSeries xField="value"/>  
              </mx:series>
         </mx:BarChart>
    </s:Application>
    Just replace the sixth line of this code by
    private  var dataProvider:Array = [{value:10}, {value:15}];
    and you will obtain a nice looking barchart

  • Xy graph with negative values in another quadrant

    How do i represent negative values in another quadrant in a xy graph?

    Hello,
    another solution would be to use separate XY- Graphs and make them partially transparent as suggested in the attached VI. But then you have to ensure that the plot areas don't resize. I don't know whether this is much easier than using picture indicators.
    Greets, dave
    Message Edited by daveTW on 03-05-2007 01:41 PM
    Greets, Dave
    Attachments:
    quadrants.png ‏15 KB
    quadrants.vi ‏37 KB

  • Material code line repeats with same values in a Query

    Hi Experts,
    I have created a small query (SQVI) to fetch the material master details of a plant. I see a lot a material codes repeating with the same data in each report I extract. So everytime I have to download the report to an excel, filter and then submit to users.
    Please advise your thoughts
    Tables used (in order) MARC > MBEW > MARA > MAKT
    Primary input fields are Plant & Material code
    other input fields are Material group and Material type
    Output fields are
    Plant
    Material code
    UOM
    Mat Type
    Description
    Old Material number
    Mat group
    MAP
    Std Price
    Val class
    Proc type
    Special Proc type
    Please help with your valuable inputs
    Thanks,
    Rajoo

    if a material has descriptions in sveal languages, then you get one record per language.
    if your material have split valuation active, then you get one record per valuation type.
    Add teh language to your selection to select only the description of a certain language (do the same for valuation type if your material is split valuated)

Maybe you are looking for