AnyGantt: How to set different bar color depending on data value.

Need to have different colors for bars in a gantt resource chart.
The color depends on certain data value not included in the visible part of the chart, so it must be provided 'extra' for the chart in some way without beeing visible.
Have studied some examples but cannot figure out the mechanism for this, and the procedure to implement it.
Any ideas?
Apex 4.2.2
Regards
Per.

Hi Per,
You mention "+Among the samples I can see that it has been implemented, but not how.+" - in the Information region below the chart that Tony referred to (https://apex.oracle.com/pls/apex/f?p=36648:50) that I've stated the following:
"The elements of the Timeline region have been customized via the Chart Attributes page, using the following settings: *Custom Colors*: #000000,#00FF00,#0033FF"
So that's how I applied custom colours to that particular chart. However, that declarative option won't meet your requirements, where the colours you wish to apply are dependent on data not included in the chart series query. You mention "+Now, if I add another column to the statement I get a yellow error message telling that the statement is not valid.+". It is not possible to simply add an additional column to the chart series query. Each supported chart type expects the associated chart series query to use specific syntax - see About Creating SQL Queries for Charts in Chapter 10 of the APEX User's Guide, http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/bldapp_chrt.htm#BCEIJJID.
So to answer your question "+How to add the new value if not providing another column to the graph?+", if you wish to customise your chart to that extent, then you will need to use custom XML. Depending on what exactly you're trying to achieve, this may require the generation of custom data for your chart. If you edit your chart, and take a look at the Custom XML region, you'll notice a substitution string, #DATA#, towards the end of the XML. When a chart is rendered, we use the chart series query to generate the necessary XML to represent the data on the chart, replacing the string #DATA# with the actual XML. The format of the data XML generated for gantt charts uses a bar style called "defaultStyle", and this handles the default appearance of the bars in the timeline region e.g.
<period resource_id="1" start="2009.03.21 00.00.00" end="2009.09.21 00.00.00" style="defaultStyle"/>You'll see that the 'style="defaultStyle" ' attribute of the data corresponds to a segment of XML outlining what that style is e.g.
<period_style name="defaultStyle">Now take a look at the Bar Style in Resource Project example in the AnyChart online documentation http://www.anychart.com/products/anygantt/docs/users-guide/bar-style.html#bar-style-application-resource-project. In that particular example, a number of different bar styles are used i.e.
<periods>
  <period resource_id="server_1" start="2008.07.07" end="2008.07.8" style="Working" />
  <period resource_id="server_1" start="2008.07.8" end="2008.07.12" style="Maintance" />If you need to add a different bar style to particular rows of data on your chart, then you'll need to add new bar style XML for each colour you wish to use in the Custom XML on the Chart Attributes page, and then you'll also need to generate the data XML yourself, applying the necessary bar style to the relevant row of data. I've got an example of how custom data can be generated for a Resource Gantt here e.g. https://apex.oracle.com/pls/apex/f?p=36648:73 but keep in mind that particular example doesn't demo adding different styles to the data...but it can certainly give you an idea of what's entailed in the generation of custom data for your chart.
I hope this helps.
Regards,
Hilary

Similar Messages

  • How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?

    Hi All,
    How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?
    Assume Material is Pen.
    While creating Sales Order in VA01 how to bring different price for the same material for Platinum,Gold and Silver Customers.
    Kindly help me out.
    Thanks,
    Renjith Jose

    A good place to start is http://www.javaworld.com/javaworld/javatips/jw-javatip34.html
    Also, do a search in this forum on HttpURLConnection. That class allows you to use POST method to send form data to a web server.
    "Hidden" variables are only hidden in HTML. The HTTP that gets POSTed to the web server doesn't distinguish between hidden and not hidden. That is, the content you would write to the HttpURLConnection.getOutputStream() would be something like:
    hidden=1&submit=ok(Of course, the variable names would depend on what the web server was expecting from the form.)
    Also, be sure to set the Content-Type request parameter to "application/x-www-form-urlencoded"

  • How to set different renderers to different cells in same column of JTable?

    Hello Friends,
    I need your help again...
    Does any body knows, how to set different renderer's for different cells of same column in JTable..??
    For ex.
    Col1 Col2 Col3 Col4
    A       A       A      A
    A       A       A      B
    A       A       A      C
    A       A      A       D
    Where A B C D would be different Renderers.  I want set exactly same ,,, ie. one column with different renderer at different cell positions..
    Right now i m setting renderer using statement bellow :
    table.getColumnModel().getColumn(int).setCellRenderer(rederer_Instance);But with this, effect in the last renderer is applicable whole column....
    Can any body help me out ?????????
    please refer this thread for similar kind of discussion...
    http://forums.sun.com/thread.jspa?forumID=57&threadID=571445Thanks
    Suyog

    Please refer to the first reply of [this thread|http://forums.sun.com/thread.jspa?forumID=57&threadID=571445] for the answer. If you have a specific problem implementing it, post you code with a specific question.

  • How to set different font for a particular row in jtables?

    How to set different font size and font type for a particular row in jtable?

    More than enough sample code here:
    [http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
    db

  • How to set a HTML color to a control button

    How to set a fixed color to a disabled button?
    I have a boolean button which has 3 status: on, off and disabled. I don't like the 'grayed and disabled' option. I will use red for off, green for on, and white gray (foreground color) for the disabled status. The HTML color code is BDBDBD. I tried to send the hex number 'BDBDBD' to the button property node 'color[4]' but was told that I was wiring to the wrong type of terminal.
    Could any one post a sample code of how to construct the structure of 'color[4]' using a RRGGBB number?
    Thanks,
    Ryan

    What exectly do you want and do you see.
    If I run the code you have in LabVIEW 9.0, I get the following result after running.
    For convenience I have shown the second color array you set as color indicators:
    Note that you use grey as the colors for True and False
    Here I have set made the colors more distinct:
    Ton
    Message Edited by TCPlomp on 07-10-2009 08:00 AM
    Message Edited by TCPlomp on 07-10-2009 08:01 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    ButtonColor_FP.png ‏17 KB
    ButtonColorMoreColor_FP.png ‏18 KB

  • How 2 set the background color in j2me

    Can any body tell me how to set the background color to midlet.??

    if you are using Screen then you can call its setBackColor()
    or if you are using Canvas then you can call
    g.setColor(r,g,b);
    g.fillRect(0,0,getWidth,getHieght);
    where g is the Graphics instance of Canvas,for further information consult documentation

  • How to set different nr of e.g dia wp for different op.modes when in instan

    I wander how to set different nr of e.g dia wp for different op.modes when in instance profile the nr of wp is fixed.
    thx in advance

    yes u can create the operation mode by using tcode rz04. the steps are:-
    1) run the tcode :- rz04
    2: select the operation mode then click on create instance (create ur instanace for eg :- day mode and night mode)
    3)click on operation mode select the timetable then select normal operation(24 hr)->assign the modes (means select the time by double click and then right click on that select assign and give the mode eg:- day mode ) same way give another modes.Incase if there is any problem then please let me know.
    4)go to back -> click on instance/operation mode ->select create new instance->give the host name & click on current setting and save it the diaglog window will appear give the operation mode name eg day mode then if you want to increase or decrease the work process by cliking on + and - tab u can change it after that save it the WP authorization some kind of this window will appear click on yes then new instance mode will appear give the instance name eg night mode then save it again dialog window will appear do changes in work process according to ur requriement and click on save again the same wp window will appear if u want to add more operation mode then click yes either no then save it . Now u will able to see ur all operation modes.
    operation mode setup
    http://help.sap.com/saphelp_nw70/helpdata/EN/c4/3a5e76505211d189550000e829fbbd/content.htm
    Operation Mode Switches
    http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a5f1f505211d189550000e829fbbd/content.htm
    Note 39412 - How many work processes to configure
    cheers
    dEE

  • How to set different header for different Standard report page

    How to set different header for different Standard report page

    Hi,
    A easy answer would be use the 'set report header text.vi' but maybe you are talking about something else ?

  • How to set different Icons for Jtreenode

    How to set different Icons for Jtreenode,i want to set icons for jtreenode,not only for leaf,open,closeicon,i hope that each node has a different icon.Thanks!

    you need to check for the node value within a renderer, then assign an icon based on what you expect to get back.
    check out this page. http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html

  • How to set different icons for different windows which is seen in the top left corner?

    Hi
    How to set different icons for different windows which is seen in the top left corner? I know when building exe there is a option to edit icons or add icons and that icon is default for all the windows in the project. But i want different icons for different windows which is possible in VB.
    Is there any way to set icon by calling any dlls.
    Thanks & Regards
    Samuel J
    [email protected]

    Hi Sam,
    no problem. See the attachment.
    Mike
    Attachments:
    TestIcon_LV85.zip ‏44 KB

  • How to set dash line color(two colors)?

    hello all:
    Does anyone know how to set dash line color in java?
    I only know how to set line color with a single color.
    g2.setColor(Color.black);
    g2.setStroke(dashed);
    g2.draw(new Rectangle2D.Double(50, 50, 200,100));
    what I need to implement is two colors interleave on the dash line.
    so that dash line looks like this:
    ==== ====
    red white red white
    thank you for any comments.
    -Daniel.

    create 2 strokes, space them appropriately, draw the rectangle twice.

  • How to set background of jtable in no data?

    How to set background of jtable in no data?
    I use table.setBackground(Color.black) but no successful
    Please help me. thanks very much

    maybe, you don't understand me.
    I have below jtable:
    ============================
    I column1 name l column2 name I
    ============================
    l data l data l
    ============================
    l data l data l
    ============================
    XXX
    ============================
    I wrote:
    table.setBackground(Color.black) then only data area has black colour, but XXX area hasn't black colour.
    How to XXX area also has black colour?
    help me, thanks very much.

  • ColumnChart color depending on the value of the column

    Hi,
    I'va been trying for 2 days to change the colors of columnseries in a columnchart and it is actually awful. I've tried to do it inline without custom itemRenderer but I quickly understood that it is impossible. I then looked on the internet, and found that it was maybe possible by creating a custom itemRenderer class, extending ProgrammticSkin and implementing IdataRenderer.
    I have tried but am not at all able to retrieve the value of the column inside the itemRenderer. Even more, the so called _chartItem is always null and never never carries anything from anyparent.
    I'm a bit exhausted of trying and getting this value, so if you have some idea, i'll be very grateful.
    Here is the code for my itemRenderer class:
    import flash.display.Graphics;
        import flash.geom.Rectangle;
        import mx.charts.ChartItem;
        import mx.charts.chartClasses.GraphicsUtilities;
        import mx.charts.series.items.ColumnSeriesItem;
        import mx.controls.Alert;
        import mx.core.IDataRenderer;
        import mx.graphics.IFill;
        import mx.graphics.IStroke;
        import mx.skins.ProgrammaticSkin;
        public class ColorRenderer extends ProgrammaticSkin implements IDataRenderer
            public function ColorRenderer():void
                super();
            private var _chartItem:ChartItem;
            public function get data():Object
                return _chartItem;
            public function set data(value:Object):void {
                _chartItem = value as ColumnSeriesItem;
                invalidateDisplayList();
            private static const fills:Array = [0xFF0000,0x00FF00,0x0000FF,
                0x00FFFF,0xFF00FF,0xFFFF00,
                0xAAFFAA,0xFFAAAA,0xAAAAFF];
            override protected function
                updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void {
                super.updateDisplayList(unscaledWidth, unscaledHeight);
                var g:Graphics = graphics;
                g.clear(); 
                g.beginFill(fills[(_chartItem == null)? 0:_chartItem.element.y]);
                Alert.show(_chartItem.index.toString());
                g.drawRect(0, 0, unscaledWidth, unscaledHeight);
                g.endFill();
        } // Close class.
    } // Close package.
    Thank you

    It worked, thanks
    Date: Wed, 21 Apr 2010 09:03:14 -0600
    From: [email protected]
    To: [email protected]
    Subject: Flex ColumnChart color depending on the value of the column
    Have you looked at doing per-item fills?
    http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WS2db454920e96a9e51e63e3d11c0bf69084-7c3f.ht ml
    This feature lets you define a function that customizes chart item fills based on their values.
    >

  • How to set field to blank if the data is # or unassigned

    hi experts,
    how to set field to blank if the data is # or unassigned?
    thx

    Hi
    add the following macro to your workbook (template workbook):
    Sub SAPBexonrefresh(qstring As String, resultArea As Range)
        For Each c In resultArea
            If LCase(c.Value) = "not assigned" Then c.Value = ""
           Next
    End Sub

  • How to set the POV in WebAnalysis when data source is HFM?

    Hi Every one..
    Could any one tell how to set pov in web analysis when data base is HFM. And hoe to make the report Dynamicall (Current Pov Member like in FR). for this if use Essbase Ican get it it easiliy by using Subtitutional variable but is ti possible fo rHFM.
    Thnaks in advance
    Rao

    yeas agree with sanakar,
    this field which shankar is talking about must be entry date (if u delta timestamp is date, u will also have to mention this table field name in definition of delta), this means that this field will catch last change to the record, so that it will be delta enabled based on the latest change date. This is very important becuase if u use date like posting date to the delta then back dated posting will not captured in to the delta, as delta for this back date is already been done.
    Hope u understand this.

Maybe you are looking for