I have below mentioned 4 xml files in which i have state & key & BuildDate. I need to represent the "state" information of "key" in a graph based on BuildDate.
The x-axis should have past 6 days (w.r.t current date. suppose today is 7th Sept then the entry should be from 1st to 6th Sept). If there is an entry for the corresponding date in BuildDate feild then the state should be displayed as red or green (Failed - red, Success - green). Otherwise black should be displayed.
I am mainly struggling in adding the value & displaying according to date.
How can i do this via jfreechart? (StackedBarChart?)
inupt_1.xml:
<?xml version="1.0" encoding="UTF-8"?>
<results>
<result id="1" number="10" lifeCycleState="Finished" state="Failed" key="PLAN-A" BuildDate="2014 Sept 1">
</result>
<result id="2" number="20" lifeCycleState="Finished" state="Success" key="PLAN-A" BuildDate="2014 Sept 2">
</result>
<result id="3" number="30" lifeCycleState="Finished" state="Failed" key="PLAN-A" BuildDate="2014 Sept 3">
</result>
<result id="4" number="40" lifeCycleState="Finished" state="Success" key="PLAN-A" BuildDate="2014 Sept 4">
</result>
<result id="5" number="50" lifeCycleState="Finished" state="Failed" key="PLAN-A" BuildDate="2014 Sept 5">
</result>
<result id="6" number="60" lifeCycleState="Finished" state="Failed" key="PLAN-A" BuildDate="2014 Sept 7">
</result>
</results>
inupt_2.xml:
<?xml version="1.0" encoding="UTF-8"?>
<results>
<result id="1" number="10" lifeCycleState="Finished" state="Success" key="PLAN-B" BuildDate="2014 Sept 1">
</result>
<result id="2" number="20" lifeCycleState="Finished" state="Failed" key="PLAN-B" BuildDate="2014 Sept 2">
</result>
<result id="3" number="30" lifeCycleState="Finished" state="Success" key="PLAN-B" BuildDate="2014 Sept 4">
</result>
<result id="4" number="40" lifeCycleState="Finished" state="Success" key="PLAN-B" BuildDate="2014 Sept 5">
</result>
<result id="5" number="50" lifeCycleState="Finished" state="Failed" key="PLAN-B" BuildDate="2014 Sept 6">
</result>
<result id="6" number="60" lifeCycleState="Finished" state="Failed" key="PLAN-B" BuildDate="2014 Sept 7">
</result>
</results>
inupt_3.xml:
<?xml version="1.0" encoding="UTF-8"?>
<results>
<result id="1" number="10" lifeCycleState="Finished" state="Failed" key="PLAN-C" BuildDate="2014 Sept 1">
</result>
<result id="2" number="20" lifeCycleState="Finished" state="Success" key="PLAN-C" BuildDate="2014 Sept 3">
</result>
<result id="3" number="30" lifeCycleState="Finished" state="Failed" key="PLAN-C" BuildDate="2014 Sept 4">
</result>
<result id="4" number="40" lifeCycleState="Finished" state="Success" key="PLAN-C" BuildDate="2014 Sept 5">
</result>
<result id="5" number="50" lifeCycleState="Finished" state="Success" key="PLAN-C" BuildDate="2014 Sept 6">
</result>
<result id="6" number="60" lifeCycleState="Finished" state="Failed" key="PLAN-C" BuildDate="2014 Sept 7">
</result>
</results>
inupt_4.xml:
<?xml version="1.0" encoding="UTF-8"?>
<results>
<result id="1" number="10" lifeCycleState="Finished" state="Failed" key="PLAN-D" BuildDate="2014 Sept 1">
</result>
<result id="2" number="20" lifeCycleState="Finished" state="Success" key="PLAN-D" BuildDate="2014 Sept 2">
</result>
<result id="3" number="30" lifeCycleState="Finished" state="Success" key="PLAN-D" BuildDate="2014 Sept 4">
</result>
<result id="4" number="40" lifeCycleState="Finished" state="Success" key="PLAN-D" BuildDate="2014 Sept 5">
</result>
<result id="6" number="60" lifeCycleState="Finished" state="Failed" key="PLAN-D" BuildDate="2014 Sept 7">
</result>
</results>
Graph: