This discussion is archived
4 Replies Latest reply: Oct 7, 2008 1:49 PM by Katarina Obradovic-Sarkic RSS

dvt:graph How to show major ticks on X-axis only for full hours?

hofespet Journeyer
Currently Being Moderated
Hi,

TP4, advanced graph.

I have an advanced graph with time values on x-axis (5 minutes grid).
Graph may start on each 5 minutes (eg. 00:05, 00:10, 00:15, .... 06:45, 06:50, ...).
How to show major tick only on full hours?

BTW: Following code neither changes majorTickStep nor the orientation of the TicketLabel for TimeAxis (Tested with FireFox)
                      <dvt:x1Axis majorTickStepAutomatic="false"
                                  majorTickStep="60.0" axisMinValue="6.0"
                                  axisMinAutoScaled="false"/>
                      <dvt:x1TickLabel textRotation="TR_HORIZ_ROTATE_90"/>
regards
Peter
  • 2. Re: dvt:graph How to show major ticks on X-axis only for full hours?
    Katarina Obradovic-Sarkic Explorer
    Currently Being Moderated
    Hi,

    Try using <dvt:o1axis> tag instead of <dvt:x1axis>.

    Hope this helps
    Katia
  • 3. Re: dvt:graph How to show major ticks on X-axis only for full hours?
    hofespet Journeyer
    Currently Being Moderated
    Hello Katia,

    because <dvt:x1axis> doesn't have the properties I'm looking for I tried following:
                              <dvt:o1TickLabel automaticRotation="AR_HORIZ_ROTATE_270"
                                               tickLabelSkipMode="TLS_MANUAL"
                                               tickLabelSkipFirst="10"
                                               tickLabelSkipCount="12"
                                               textRotation="TR_HORIZ_ROTATE_270"/>
    With this I managed to change the orientation of the X-axis label but changing tickLabelSkipFirst and tickLabelSkipCount seems to have no effect.
    (Testes with IE7 and FF2).

    With TP4 it's also not possible to show vertical gridlines (Frank also commited this in an other thread). Will this feature be available in production release?

    regards
    Peter
  • 4. Re: dvt:graph How to show major ticks on X-axis only for full hours?
    Katarina Obradovic-Sarkic Explorer
    Currently Being Moderated
    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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points