Line Chart in Apex

Is it possible to change color of line graph based on a condition? I want to show red if the line passes above 90 percent and then show green when the line drops below 90 percent. Can someone help me on this?

I'm sorry, my instructions were not very clear about posting code. Lets try that again. First off, I mistakenly instructed you to use a [ character when the correct character is {.  I evidently need to learn how to use the shift key properly.  The best way to post code is by enclosing it in {code } tags. So, when you post, it will look like {code }Your XML here{code } (again, no spaces in the tags). The output will look like:
Your XML hereMore info about this can be found: http://wikis.sun.com/display/Forums/Forums+FAQ
Next, onto the real question at hand. It appears that you are getting close. Your page item P50_DATA should define each data point in the chart. It should begin with a <data> tag and have at least one <series> tags, with points defined. Your current PLSQL output is an example of one of the points that would belong in the series. If you turn on DEBUG, a link will appear next to your chart labeled 'Show XML'. click that link to see the entire XML that is rendering your chart. Once you have that, post it here if you need help reading it.
Getting back to your PLSQL output, in the code you will need to determine which style each point will use. I assume this will be based on the Y value. An example of how to do this: <point name="GREEN" y="1" style="style1"></point>
<point name="RED" y="97" style="style2"></point> As mentioned earlier, you will need more than just the example code given above in page item P50_DATA. You will need the entire XML string from the beginning <DATA> tag to the </DATA> tag.
Hope this helps
Austin

Similar Messages

  • Charts (Line chart) in apex 2.0 /3.0 limit of resulting rows in char area

    Hello @apex experts,
    does any body knows if there is a max number of resulting rows by using a line chart. It seems that until 150 resulting rows all is o.k. but when I try to get a line - chart area for a whole year (365 days) no chart is displayed. I spread out the chart area to 2056 x 800 px but no restult is displayed by using the > 300 resulting set.
    Regards and thank you for help

    I changed this and put usage of UTL_FILE into a dynamic PL/SQL. The package will
    compile and work unless you want to create debug information. If yes, then it will raise an
    error message. So, you don't need UTL_FILE execution priviledge from your DBA.
    I opened the package and you may modify it the way that you don't need any public
    synonyms and no UTL_FILE to run it.
    There are so many questions in this forum related to "What is my DBA going to say?" or
    "How is he going to react?". Even for some minor issues. I have myself also seen some
    of similar situations and the only thing I can sey is:
    You got to use that powerfull tool Oracle Database instead of hiding it away from your
    users and developers. Learn how to control it instead of prohibiting access to it! Otherwise,
    it's just a waste of money.
    Denes Kubicek

  • Covered Line Chart in Apex

    Hi,
    In Apex there are several types of charts but I dont find the covered Line chart. Is there any function to create a covered line chart with the lite Version? For example: I have a blue line and I want to have a blue covered area up to this line. I am using Oracle Apex 4.0 and i dont find this kind of chart in the chart types. Am I able to change the custom XML to this type of chart?
    Thanks Thorsten

    Hi Thorsten,
    I believe the chart type you are referring to is an Area Chart, where the region from the chart axis to the line on the chart is coloured in. This chart type is not one of our licensed AnyChart chart types. You are only licensed to generate AnyChart chart types that are exposed via our wizards. For the generation of any other AnyChart chart types, you will need to obtain a separate license from AnyChart.
    Regards,
    Hilary

  • Creating a Line Chart in Apex

    Hi, I'm a new Application Express user, and I've been trying to create a chart region in one of the pages of an application I'm developing, only my queries fail and tell me that my tables that clearly exist do not exist. Btw, the table I'm querying exists in a different schema. Any ideas?

    Have you noticed the Oracle Application Express (APEX) forum?
    Could be a permission problem, but I'm only guessing.
    C.
    Message was edited by:
    cd

  • Line chart with 2 different y axis

    hi,
    i have a question on line chart in apex. i'm using apex 4.2. is it possible to generate a line chart with 2 different y axis? here's a sample data to illustrates what i'd like the chart to look like.
    date price percent
    1/1 1 100
    1/2 2 90
    1/3 3 80
    1/4 4 70
    the x-axis will be the date column. the left y-axis would be the price column. and the right y-axis would be the percent column.
    i know i can plot multiple lines in a chart thru different series. but they're based on the same x and y axis range. thanks
    jim

    You beat me to it.
    One of the problems I'm having is that the begining and ending point(s) coincide. So, instead of two completely separate lines, I have an area bounded by the series 1 line on top and the series 2 line on the bottom. Since the points overlay, the values of those points also display one on top of the other. I'll have to see if there is a way to separate the series. I've had 3 separate series before, but never with two y-axis.
    Regards,
    Howard

  • Create Charts With APEX

    Hello, may someone help me with charts on apex?
    I need to create a Radar Chart, this kind of chart isn't avaible on APEX then, I should buid it,
    I have found some models of this chart, but I'm not getting sucefull when I try to use the data from my database.
    I'm using APEX 4.1.
    Thak's everybody.

    LeoVic - Hello,
    Can you make an example on apex.oracle.com to show us what you have so far?
    Here's an example of mine -- but with a line chart. http://apex.oracle.com/pls/apex/f?p=43250:3 Login: Dever PW: Ima9Dever
    And then tell us what you would want to be different.
    Best wishes,
    Howard

  • Line thickness in Apex 4.02 flash chart for Legend

    Does anyone know how to set Line thickness in Apex 4.02 flash chart for Legend?
    My users can read the label fine, but the part where it shows the line color is very small and hard to match to the chart.

    Many attributes can be set in the Chart Attributes page Custom XML section. Line thinkness. Legend font size, height and width. But I haven't found a setting for the "icon" size. Even thought I increased font size and the size of the Legend on the page, the legend "lines" remained unchanged in size.

  • Malformed svg with Line Chart and empty results on ApEx 3.0

    Hello everyone,
    I'm experiencing problems here at our local ApEx installation:
    If I add a line chart using a query that returns an empty result, for example,
    SELECT 1 link, 2 label, 3 value FROM dual WHERE 1=2;
    I get a malformed svg, and Firefox (2.0) does not display the chart but an error message.
    I traced the error and found that the "no data found"-text to be displayed has a syntactical error:
    <svg width="600" height="400" viewBox="-5 -5 600 400" preserveAspectRatio="none"> <text class="nodatafound" x="40" y="20">No data found.</text></g></svg>
    The <g>-tag is closed although never opened. So the SVG-engine in Firefox behaves right by throwing an error message. However, internet explorer with the Adobe-plugins seems to ignore the tag and displays the correct svg image.
    If using a different type of chart (i've tested with the vertical bars), the error does not occur, neither does it when the result is not empty. I've noticed though, that
    the line chart seems to have problems if only one row is returned, it then
    displays an empty graph.
    Has anyone had the same kind of problem or is able to reproduce it, so I could file a bug report to Oracle?
    Any help is appreciated,
    Marc
    PS: I use ApEx 3.0.0.00.20 on Oracle 9i

    How can i debug ? Is anything helpful reported in the iAS logfiles?

  • APEX multi series line chart with different markers for each series

    I am using APEX 4.0 and trying to create a multi-series line chart that will have a different for each series.
    Does anyone know how to accomplish this?
    Edited by: user4635837 on Apr 19, 2011 7:22 AM

    Hello -
    It is possible to do.
    Another user in this forum has written some code snippets to assist in creating your own custom XML for charting. That reference can be found http://apex.oracle.com/pls/apex/f?p=36648:30:418355095936797::NO:::
    Look this over and it should get you moving in the right direction.
    What you are trying to do isn't terribly difficult. In fact, I did it fairly easily as can be seen http://apex.oracle.com/pls/otn/f?p=28155:4:362637005964920:::::
    First, create a Hidden page item.
    Next, create a process that runs before regions
    That process will create the XML for your line chart and store it in the hidden page item. Use the above references for assistance in setting up the PL/SQL in the process
    Then, create your custom XML for your chart. Replace the #DATA# tag in the custom XML with your hidden page item.
    It is a bit daunting at first, but once you get the hang of it, it really isn't that bad.
    Austin

  • Hint Values on Line Chart

    When you setup a line chart, the LABEL portion of the SQL query becomes the X axis value on the line chart. When there are multiple series on a line chart, each series is its own distinct line. If the series has a LABEL that is not yet on the chart, it adds that label to the x axis at the end of the axis. If the new series has a LABEL that is already on the chart, then it places the Value on that existing place on the x-axis. This Label is also used in the Hint portion of the chart.
    So lets compare the number of Sales per day of a Department across a length of time, say 3 months. So, on first working day on Jan dept A has 31 sales. On the second working day of January thay make 35 sales and so on until March 31. Our company doesn't work on weekends so we won't have sales on those dates. Dept B has their numbers for the same dates.
    We setup a series for each month (Jan, Feb, March). Then we place the total number of orders for each date on the graph and connect the dots! Great! But wait, the more months I add, the shorter each line gets on the graph. What if we were comparing 3 years worth of data instead of 3 months. The x-axis would have 600-700 values instead of 60-70 values. Oh my.
    What if we make each series of data its own line over the same scale? That way each month shows in the same space with the first day of the month at the left and the last day of the month near the right. Sounds good. But wait, we are now making up a scale. And when we do this, the Hints on the data points become meaningless. I want to show the actual date value in the hint but have the line over my custom X-Axis. What I need is an additional field that I can use to add to the Hint portion of the chart. Obviously, this would require using custom xml and a custom data element, but is this even possible given the constraints of the SQL syntax?
    To visualize this issue better: http://apex.oracle.com/pls/otn/f?p=28155:1
    Austin

    Andy -
    I need to thank you for the direction on the substitution variables reference. That will be a major help.
    However, i must correct a statement (underlining is mine)
    So, if you switch to Custom XML and find the <tooltip> tag and add {%SeriesName} after the existing {%Name} entry, you end up with the _"day of the month" (which is your value)_ and the Series Name value, which is January - so, "1 January"This is a common misconception that the numeric value on the x axis represent the "day of the month" , when in fact it does not. You logically cannot use the day of the month for this type of axis. Why not? It is because weekends are excluded. So, one month may begin on a Friday. If that were the case then the 2nd of the month would be a Saturday, which would work for a single series of data. But what about when you add in the next month and it begins on a Tuesday. Well then, if you use the day of the month as the value, the 2nd day of the second series actually gets plotted after all the days of the first month.
    The solution is that you have to generate a common arbitrary scale for all series of data. When you do that, you lose the date values.
    I have tried to illustrate all of this by adding to the existing examples in the link provided above. Some other odd behaviors of using the day of the month as the x-axis value can be seen as well. I have also implemented the suggestion of adding the {%SeriesName} tag to the Hint via the custom xml.
    Austin

  • Change Color from grid lines in Flash 2D Line Chart

    Hi,
    does anybody know how to change the color from the grid lines in 2D Line Chart?
    The color is always black (000000), I will use gray (CCCCCC).
    I can use a custom XML. Can you give me an example please???
    Where can I read something about the possible XML-Tags in Custom XML for Charts?
    Best regards
    Simona

    Simona,
    anychart.com has XML reference you can use for the charting engine in APEX.
    Try using custom XML and sticking this inside the grid > values tag:
    <lines color='0xCCCCCC' />- Marco

  • 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

  • 2D Line Chart question

    I have Apex 3.1 . I have created a 2D Line chart with for different series (so there are 4 lines on one chart). I also have a Legend on the left side next to the chart to label whatr each line is for. In my query for those lines I have the Name for the Legend as all CAPS but it shows up as first letter capital and the rest lower case. Is there a way to force it to all upper case?
    The second question I have is that underneath the legend I would like to have some type of text box were I can write a couple lines to help explain what is going on in the graph. Is there a way to do that?

    You basically have only a couple of options here:
    First, turn off the labels and possibly turn them into Hints. They wouldn't show on the chart, but when the user held over the data point, a tool tip would appear showing them the valuable.
    Second, adjust elements of the chart. What you are really looking at here is that your data set is causing this specific issue and not the charting engine or anything like that. You could try to manually change the axis max and min to get more spacing, or you could adjust the height of the chart to get more spacing, but this may not be a viable option. You could have one set of labels above the plotted line and another set of labels below the plotted line that way the values do not overlap with anything. However, from a conceptual standpoint, it will be difficult to determine in code which line should have values above and which should have values below. When your data set changes, you may end up with labels in the wrong place if you hard code where they are at.
    The current XML reference can be found at: http://www.anychart.com/products/anychart/docs/xmlReference/index.html however, that is for anychart 5. I'm looking for the link to the earlier versions...
    You can use this to create custom xml where you can adjust the position of the labels.
    Finally, you do not want expand the height of the chart between two points on the Y axis. That would change the structure of the chart and the visual properties of the chart and the shape of the data would be askew. You cannot do this for good reason. You can though use a logrithmic scale. In most cases though, this is not a practical solution. Data sets need to have very specific characteristics in order to be able to merit a logrithmic scale. Most queries require a simple linear scale.
    Austin

  • Line chart legend titles - fixed length?

    Hi
    I use a number of line charts wherein I specify the title of the individual series via variables &var1. and so on.
    When I use more than 3 series in the chart, the 4th and following(up to 6) series titles are shown in '2nd' column' in the legend title/color area of the chart.
    However it seems 2nd column always start a fixed number of px to the right of the 1st column no matter how long the titles of the legends in the first column is.
    The result is that legend titles and colors are written on top of each other and it looks very messy.
    Can I get around that somehow? Is there a fixed length defined somehow?
    I thought I could just pad blanks to the legend titles in the 1st columns, but no. I tried in a number of ways doing that via &nbsp, and &#160 and so on - but no effect.
    Anyone? any ideas?
    Best regards,
    Jesper G

    I've the same problem with APEX 2.2, does someone has an issue?

  • How to display a goal line in a Flash 2D Line Chart?

    Hello,
    I am using Apex 3.0.1 and have a Flash 2d Line Chart displaying a ratio that varies from 1.0 to 1.6 for every month for a year. I need to draw a goal line at 1.2 to show the goal for the ratio. Also, I have grid lines enabled for the y-axis.
    Any pointers/tips on how to accomplish displaying this goal line would be really useful.
    Thanks and Regards,
    Dev

    I'm having the same problem!
    APEX is relatively new to me. CUSTOM XML for tweaking charts is even more recent. I tried to get a goal line to work in a line chart as you described but I have had no success. I really require a target/goal/reference line in a vertical bar chart but getting it to work in a line chart would be a welcome first step.
    I have tried the following 2 samples of code without success:
    <objects>
    <line value='94' text='Target' text_position='right' color='0xFF3300' size='1' alpha='100'/>
    </objects>
    and
    <objects>
    <trend start_value='94' end_value='94' start_argument='' end_argument='' value='' color='0xFF3300' thickness='1' alpha='100'/>
    </objects>
    ==> in the following blocks of the CUSTOM XML:
    <chart .....</chart>
    <chart..<line_chart .....</line_chart>..</chart>
    <workspace> .. <chart_area .....</chart_area> ..</workspace>
    <workspace> .. <y_axis .....</y_axis> ..</workspace>
    <workspace> .. <grid> ..<values .....</values ..</grid> ..</workspace>
    <workspace> .. <grid> .....</grid> ..</workspace>
    Any idea where I am going wrong or what could be missing? Maybe I'm not putting the <objects> parameters in the correct place in the code?
    System Info:
    Product Build: 3.0.1.00.07
    NLS_CHARACTERSET: WE8MSWIN1252
    DAD CHARACTERSET: UTF-8
    JOB_QUEUE_PROCESSES: 10
    Database Version Information
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE 10.2.0.3.0 Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Thanks for any help!
    Lawrence

Maybe you are looking for

  • FRM-92101:

    Hi I've got an error message while running form.it is.... FRM-92101:There was a failure in the Forms Server during startup. This could happen due to invalid configuration. Please look into the web-server log file for details. What may be the fault an

  • Delivered quantity for each schedule line

    Hi, Our scenario is that we have an order for each order's each item we can have multiple schedule lines, when any of the schedule line is delivered the delivered quantity colum is updated, the schedule lines table in VBEP but the thing is it doesnot

  • How to use a database to fill out a form?

    Hello, I have been several months attempting an invoice form with LiveCycle Designer 8.0 for my company advertising, but fail to complete it. I have an Access 2007 where are 500 customers beside the name of its establishment, client code, address, ta

  • Automatically Assign Control Key for External Assignment

    Hi All, Please can someone advise how I automatically assign the External Processing Control Key at the operation level using the Work Centre. I have a Main Work Centre set up which is linked to every Functional Location. This Work Centre has a defau

  • HT4113 Have old iPhone forgot unlock code and my itune don't work to restore it

    TRy to use my old 3GS but have forgot my lock code and it will not synic with my iTunes