LinearAxis as horizontal axis in LineChart

Hi guys,
The ff: is an excerpt of the xml i am working with:
<?xml version="1.0" encoding="UTF-8"?>
<efiles>
<dataset name="BoyBMI">
<age month="24">
<P5>14.737319472</P5>
<P10>15.090328265</P10>
<P25>15.74164233</P25>
<P50>16.575027675</P50>
<P75>17.55718781</P75>
<P85>18.162194733</P85>
<P90>18.609481276</P90>
<P95>19.338010618</P95>
</age>
<age month="24.5">
<P5>14.719292573</P5>
<P10>15.071174743</P10>
<P25>15.71962876</P25>
<P50>16.547774867</P50>
<P75>17.521292788</P75>
<P85>18.119549228</P85>
<P90>18.561106338</P90>
<P95>19.278898128</P95>
</age>
<age month="25.5">
<P5>14.683608414</P5>
<P10>15.033357254</P10>
<P25>15.676344635</P25>
<P50>16.494427632</P50>
<P75>17.451350388</P75>
<P85>18.036680126</P85>
<P90>18.467295933</P90>
<P95>19.164659645</P95>
</age>
</dataset>
</efiles>
The actual age(months) values is up to 240.5 months. So this
xml is kind of too long to post. ;)
Anyways, the goal is to present this data into a line chart
with the elements:
-age(in years) in horizontal axis;
-the values of P5,P10,P25,P50,P75,P85,P90,P95 in vertical
axis.
The values are plotted so well in the chart and so is the
vertical axis. The problem is in displaying labels in the
horizontal axis. Primarily, I made use of CategoryAxis but the
labels are not displaying at all. And then i utilized LinearAxis
and created a labelFunction renderYears(). However, I noticed that
it takes a different value for the month. Why is it that the age
values taken by LinearAxis is the index instead of the month value
in the xml? Say, the age month value in the xml is 24, the value it
evaluates is 0, then if the month value is 24.5 it takes 1, so on
and so forth. How can LinearAxis takes month as the value to be
evaluated in the labelFunction? Please help....
Thanks a lot.

Hi guys,
The ff: is an excerpt of the xml i am working with:
<?xml version="1.0" encoding="UTF-8"?>
<efiles>
<dataset name="BoyBMI">
<age month="24">
<P5>14.737319472</P5>
<P10>15.090328265</P10>
<P25>15.74164233</P25>
<P50>16.575027675</P50>
<P75>17.55718781</P75>
<P85>18.162194733</P85>
<P90>18.609481276</P90>
<P95>19.338010618</P95>
</age>
<age month="24.5">
<P5>14.719292573</P5>
<P10>15.071174743</P10>
<P25>15.71962876</P25>
<P50>16.547774867</P50>
<P75>17.521292788</P75>
<P85>18.119549228</P85>
<P90>18.561106338</P90>
<P95>19.278898128</P95>
</age>
<age month="25.5">
<P5>14.683608414</P5>
<P10>15.033357254</P10>
<P25>15.676344635</P25>
<P50>16.494427632</P50>
<P75>17.451350388</P75>
<P85>18.036680126</P85>
<P90>18.467295933</P90>
<P95>19.164659645</P95>
</age>
</dataset>
</efiles>
The actual age(months) values is up to 240.5 months. So this
xml is kind of too long to post. ;)
Anyways, the goal is to present this data into a line chart
with the elements:
-age(in years) in horizontal axis;
-the values of P5,P10,P25,P50,P75,P85,P90,P95 in vertical
axis.
The values are plotted so well in the chart and so is the
vertical axis. The problem is in displaying labels in the
horizontal axis. Primarily, I made use of CategoryAxis but the
labels are not displaying at all. And then i utilized LinearAxis
and created a labelFunction renderYears(). However, I noticed that
it takes a different value for the month. Why is it that the age
values taken by LinearAxis is the index instead of the month value
in the xml? Say, the age month value in the xml is 24, the value it
evaluates is 0, then if the month value is 24.5 it takes 1, so on
and so forth. How can LinearAxis takes month as the value to be
evaluated in the labelFunction? Please help....
Thanks a lot.

Similar Messages

  • Scaling of the x-axis on LineCharts

    Hello everyone,
    I'm working on using a LineChart to display incoming temperature readings from an embedded device and so far it's working very nicely, but I'm hoping someone can help me with one small problem I'm having.
    I build an ArrayCollection of the temperature readings, including a timestamp of when the reading was received using a Date object, which is then used as the dataProvider for my LineChart.  The vertical axis is plotted correctly, but readings are plotted evenly-spaced on the horizontal axis even though readings are not made at regular time intervals.
    For example, if I received a reading at 1 minute, 2 minutes, and 35 minutes, the three temperatures would be evenly spaced on the horizontal axis.  I want the horizontal axis to accurately represent the time frame of the readings received, so that with the previous readings there would be two points very close to the left hand of the horizontal axis and a single point plotted much further away.
    I seem to be having trouble explaning this clearly so here is a quick sketch I made of the situation:
    Thank you so much in advance for your help!
    Sincerely,
    Tom Morrisey
    Diversified Control, Inc.

    Hi,
             Set the interval for Horizontal axis with minInterval and Max Interval
    <mx:LineChart id="chart" dataProvider="{arr}">
            <mx:series>
                <mx:LineSeries yField="Y" xField="X" >
                </mx:LineSeries>
            </mx:series>
            <mx:horizontalAxis>
                <mx:LinearAxis interval="2" minimum="0" maximum="40" />           
            </mx:horizontalAxis>
        </mx:LineChart>

  • Labels are not clearly visible on Horizontal Axis

    I want to display a full timestamp on the horizontal axis of a LineSeries. But the labels are not clearly visible. The below is the screenshot.
    I have already tried using LabelRenderer and set a larger font size and also tried increasing the width of the label itself. But, it didnt work. It seems there is some container for the lable which has fixed width. Does anyone know how to increase this width and make the text clearly visible.
    Thanks

    Hi Mohd Fayaz,
    Have you tried setting the larger fontSize on LineChart.
    <mx:LineChart fontSize="18" />
    Thanks,
    Bhasker

  • I want the minimum of the horizontal axis to be the first day of the month.

    I have a situation where I want the minimum of the horizontal
    axis(with date time axis) to be the first day of the month. I
    attempt it like so:
    var max:Date = new Date();//current date is our max from
    which we will calculate the min
    var min:Date = new Date(max.fullYear,max.month,1);
    dateTimeAxis.minimum = min;
    However this first date on this axis is the last day of the
    previous month for example 31 August instead of 1 September. Any
    ideas how to fix?

    Nikos, the only thing I can think of (off hand) is that it's
    defaulting to "zero" hour on that date, if you tried:
    var min:Date = new Date(max.fullYear,max.month,1,13);
    Would that make it work? That would set the date to 1pm.
    Have you considered defining the axis with the data you are
    binding to?
    Cheers,
    David

  • OBIEE 11G: Can I set limit on number of ticks only on horizontal axis and zoom in if I want to?

    Hello
    Is there a way I can restrict the total number of ticks on horizontal axis only? Say I want to set it to show only 24 ticks on horizontal axis. I am putting date and hour on the horizontal axis, if I take 3 dates of data, I will have 3X24 = 72 ticks on the chart, but I want the chart to show only 24 ticks. So it's pretty much ticks for 3 hours on the horizontal chart in this case.
    Can this be done?
    Second, if the first can be done, then can I then zoom in to any ticks on the horizontal axis, and it would show be the break down of this ticks, which is made up with 3 hour's performance separately?
    Thanks

    The zooming feature was ok, but what if I want to zoom in on just a specific area between the ticks when only 1 click?
    Any thoughts?

  • Feedback on impementing second horizontal axis using Flex 2.0.1

    I am attempting to use the concept of a second horizontal
    axis using Flex 2.0. It is not clear to me if it is supported by
    the Flex 2.0.1 sdk although livedocs does provide an example using
    secondVerticalAxis. A snippet of my code is attached with this
    message. At runtime, the second series does not display. Any
    feedback about usage of the component would be greatly appreciated.
    Thanks.

    >>That data base is fine for a development environment.
    Thanks edbrendel.
    So, since I am able to run Apache 2.2 as I want to, would I
    be better of to use MySQL 5 or MS SQL Express if I want it to be
    largely development, but also for my own stuff (my galleries etc.)
    actually running pages served to the web?
    I know of the technotes, a couple of them (incl. the MySQL
    note on installing V. 5 as a datasource and all that), but never
    saw that one...so thanks very much. I've manually added the Apache
    2.2 file line in httpd.conf and added the file in the config area,
    which always worked in the past with XP Pro and XP64...hope it does
    with 2003 I had 2003 server when I first started playing, it was a
    nightmare, I hope now that I've bought everything I can wrap my
    head around it!). I just make sure I don't try to configure CF
    until after manually adding the files, and changing the Apache
    config file and restarting. Then I go into the administrator for
    the first time.
    Shawn

  • Horizontal axis Labels in tabular style

    I have a weird requirement. I want to draw the horizontal axis of a  column chart in a tabular style, like a table with one row. each label  will become one cell. I am trying to tweek it out, since I can see  labelRenderer of AxisRenderer is the only way for that. I had a small lead, when I used opaquebackground to give the backgound color. But since am using label renderer for formatting the labels, the opage background is painting in too much thickness. please give any  input if anyone have any other lead.

    Hi Stewart,
    I could not try this yet, but how about 'Enabling the Contains HTML Markup' for the columns for Heading and including a '</br>' tag at the end of the name.
    Ex: Column - >Properties -> column Format -> Column Heading -> Enable Contains HTML Markup -> Column Heading's suffix =less than symbol /br greater than symbol (Oracle forums is even break the line too!! ;) So included the text)
    Hope this helps.
    Thank you,
    Dhar
    Edited by: Dhar on 15-May-2012 20:11
    Edited by: Dhar on 15-May-2012 20:12

  • Horizontal Axis labels display

    I have a graph with the a daily value for a whole year which
    means I have 365 values on one graph the lineseries are readable
    but the fact to have 365 labels on the X-axis makes it not
    readable. Does anybody knows how to display only one label over ten
    of the horizontal axis.
    Thank you for your help.

    Anyone help me in this ???
    some time i need to hide them also. how to do ?

  • Break for Horizontal Axis Labels in OBIEE 11g Bar Chart

    Hi all,
    I have a vertical bar chart created in OBIEE 11g. The horizontal axis (x-axis) is a compound of Scenario, Year, and Month. The chart width is already long enough so it cannot be made any longer.
    The chart looks like this (the label of horizontal axis is staggered):
    ___llllllllllllll_________llllllllllllll_________llllllllllllll_________llllllllllllll
    ___llllllllllllll_________llllllllllllll_________llllllllllllll_________llllllllllllll
    ___llllllllllllll_________llllllllllllll_________llllllllllllll_________llllllllllllll
    ___llllllllllllll_________llllllllllllll_________llllllllllllll_________llllllllllllll
    Actual Feb 2012____________Actual Apr 2012
    ___________Actual Mar 2012_____________Actual May 2012
    How can I force the labels for the horizontal axis to be broken into 2 lines (or even 3 lines), so that it will look like this:
    ___llllllllllllll_________llllllllllllll_________llllllllllllll_________llllllllllllll
    ___llllllllllllll_________llllllllllllll_________llllllllllllll_________llllllllllllll
    ___llllllllllllll_________llllllllllllll_________llllllllllllll_________llllllllllllll
    ___llllllllllllll_________llllllllllllll_________llllllllllllll_________llllllllllllll
    ___Actual________Actual________Actual________Actual
    __Feb 2012_____Mar 2012_____Apr 2012______May 2012
    Any advice? Thanks a lot!

    Hi Stewart,
    I could not try this yet, but how about 'Enabling the Contains HTML Markup' for the columns for Heading and including a '</br>' tag at the end of the name.
    Ex: Column - >Properties -> column Format -> Column Heading -> Enable Contains HTML Markup -> Column Heading's suffix =less than symbol /br greater than symbol (Oracle forums is even break the line too!! ;) So included the text)
    Hope this helps.
    Thank you,
    Dhar
    Edited by: Dhar on 15-May-2012 20:11
    Edited by: Dhar on 15-May-2012 20:12

  • Chart horizontal axis show whole year

    Hi All,
    How to display whole year month as horizontal axis even if no data? for example, currently I have data for FY13 up to Jan 13, no data for Feb 13, Mar 13, Apr 13, May 13 and Jun 13 yet, in the chart it will automatically showing horizontal axis from July 2012 to Jan 2013, but I want to show horizontal axis from July 2012 to June 2013, if not yet data, line stops.
    Thank you,
    Ling

    Hi,
    Apart from the option mentioned above, you can also create an right outer join in the BMM layer of the RPD.
    This is only recommended if the data expected by you is the same in all the reports using this combination of the tables.
    Thanks,
    Vineeth

  • Line graph, How do graph month only on Horizontal axis?

    I'm trying to graph year trends by month on the horizontal axis. However, it keeps breaking up the months by adding the year, so I have three separate line trends. How do I fix this?

    Hi,
    You should move to the production version of JDeveloper 11g that was just released:
    http://www.oracle.com/technology/products/jdev/index.html
    However I have a answers for your questions:
    1. Setting time tick labels to hours: This should work by setting continuousTimeAxisInterval="CTAI_HOUR" on the advanced graph tag.
    Here's the tagdoc for that attribute.
    continuousTimeAxisInterval      
    Specifies the interval along a continuous time axis only if you want to override the value that the graph calculates automatically. Valid values are as follows:
    * CTAI_AUTOMATIC - (Default) Graph calculates the interval automatically.
    * CTAI_YEAR - Sets the interval to years.
    * CTAI_MONTH - Sets the interval to months.
    * CTAI_DAY - Sets the interval to days.
    * CTAI_HOUR - Sets the interval to hours.
    * CTAI_MINUTE - Sets the interval to minutes.
    * CTAI_SECOND - Sets the interval to seconds.
    2. Vertical gridlines can be set by using the o1Axis tag and setting the tickStyle. This should change all o1Axis ticks to gridlines. For different lineStyles, you can also use the lineStyle attribute.
    <dvt:graph>
    <dvt:o1MajorTick tickStyle="GS_GRID"/>
    </dvt:graph>
    Hope this helps
    Katia

  • Crosstab missing horizontal axis fields

    I have a crosstab discoverer report with the following structure:
    ====================================================
    .............|Y | Y | Y |
    X1 X2 X3 |Z | Z | Z |
    X1 X2 X3 |Z | Z | Z |
    X1 X2 X3 |Z | Z | Z |
    X1 X2 X3 |Z | Z | Z |
    Y = verticle axis item
    X1, X2, X3 = horizontal axis item
    Z = datapoint item
    Discoverer Desktop Edition v4.1.48.06.00
    ====================================================
    For a particular row, X2 and X3 are always blank, but I know that they actually have a value.
    If I go into edit sheet and change X2 and X3 to datapoint items and refresh the sheet, then I can see their values. If I then go into edit sheet and put X2 and X3 back to horizontal axis items, then their values appear. However the next time I open the sheet I have to do the same.
    Any ideas??? Please note that upgrading to a newer version of Discoverer is not an option.
    Thanks

    Hi Gareth
    That's actually the way drilling works behind the scenes. Think of how you would do it yourself. If you wanted to drill up, essentially collapsing, you would remove the item(s) that were causing the details to be displayed and add a condition to only display by the items you want.
    Even though you didn't ask Discoverer to do it, in effect you did when you told it to collapse. The answer is - don't drill or collapse and then save. This saves SQL which you probably will not want.
    Of course I appreciate that this is not what you wanted to hear but please don't shoot the messenger. I don't work for Oracle you see, I just know how Discoverer works.
    Best wishes
    Michael

  • Horizontal Axis X doesn't cross at $0

    I have a column chart with negative values. I need to have a clean design of the dashboard and i took off all horizontal gridlines
    In Excel charts you have an option to show your X Axis at 0 value on the chart, but it looks like we don't have this option in dashboard charts.
    Does anyone knows any creative solution how to show the Z Axis at 0 value???
    Thank you.

    Hi Alex,
    Try changing your scale in the 'Behavior > Scale' tab to "Manual" scaling. You will need 2 formulas for the min/max.
    A = rounddown(min([range of all values]),-4)
    B = roundup(max([range of all values]),-4)
    These will give you your lowest and highest values being plotted, and round down or up to the nearest 10,000.
    In the Divisions section below that, bind "Size of Division" to the following formula:
    (B - A) / 4
    Then in 'Appearance > Axis' tab change show only major grid lines, and change them to be the same color/size as your horizontal axis. You should get something similar to the attached result. Slightly different than what you're looking for, but the closest you'll get without custom graphics/layering multiple charts.

  • Horizontal Axis not showing when initial loading

    Hi,
    We are on Dashboard 4.1 SP3.
    I have drilling down configured on the Dashboard report. The issue is when initial loading the dashboard. the horizontal text are not showing completly, untill I click the other column of the parent column, it shows the child horizontal text.
    Could you please help.
    Thanks,

    Hi Dave,
    There are some issues still in displaying the horizontal axis.
    1844514 - Dashboard X axis labels are cutoff
    As a workaround what you can do, use the range slider to make the date text to display vertically rather than horizontal or you can enlarge the size of the chart at the max to make them to display vertical.
    Hope this helps!!!
    --SumanT

  • Horizontal axis labels

    Hi everyone.
    I've got a line graph, and currently the labels on the horizontal axis are centered on the gridlines / ticks. How can I move the labels so they appear between the lines?
    any help much appreciated!
    Kieran

    I can't give you a full answer, but I can point you in the
    right direction
    1) Add a label function to your categoryAxis
    <mx:horizontalAxis>
    <mx:CategoryAxis labelfunction=test categoryField="cdate"
    />
    </mx:horizontalAxis>
    2) Code your label function in an AS block something like
    this:
    public function test(categoryValue:Object,
    previousCategoryValue:Object, axis:CategoryAxis,
    categoryItem:Object):String{
    if (previousCategoryValue == null){
    return categoryValue.valueOf();
    }else if (previousCategoryValue.valueOf() !=
    categoryValue.valueOf()){
    return categoryValue.valueOf();
    }else
    return "";
    Now, the thing is, your axis category is going to be a date,
    right ? I'm guessing, because I haven't seen your data. So, each
    date will be different to the next, so you'll ALWAYS fall into the
    second condition of the for loop. What you'll have to do is extract
    the "year" value and store that in a temporary value that always
    stored the "Current" value, example: 2005. When you come across a
    year of 2006 (temp != current year value of the axis), return the
    NEW current year value.
    If you are including the "year" value in your datasource
    item, you can access that in the "categoryItem" variable. If you
    debug the above code, you'll get a better look at what's going on.
    I'm sure you'll have no problem going from here.
    Cheers,
    David

Maybe you are looking for