1 Reply Latest reply on Mar 3, 2011 1:16 AM by TheGarfunkal

    Charting - Plotting Time Against Date (Flex 3)

    TheGarfunkal

      Hi

       

      I have a data source with a date - and each date has a time associated to it - Basically I need to represent the time of a database build completing each day on a bar chart.  I've knocked up an example in excel:

       

      TimeAgainstDate.PNG

       

      I've been trying to do something similar in Flex 3- i've had quite the time messing about with it - Converting the time to numeric with 2 dp, trying a datetime axis, and nothing seems to work.  I'd really appreciate a little help.

       

      I have full control over the data coming in (from sqlserver) Currently the time is taken from a date so its a varchar - but I can alter that if thats whats required

       

      So far I have the chart below  - it uses a concept of breach (hours over a set time of 9am), which is nonsense... I really need to plot real time v date.

       

       

            <mx:ColumnChart id="ccBarSystem"

            height="95%"

            width="100%"

            creationComplete="{PodContentBase.SystemHistory()}"

               showDataTips="true"   

              dataTipRenderer="dashboard.renderers.ChartRender"

              axisTitleStyleName="chartfontStyle"

              left="5" top="5">

           

            <mx:horizontalAxis>

            <mx:CategoryAxis id="baraxis"

            dataProvider="{PodContentBase._SystemHistory}"

                categoryField="Period"

                title="Builds by completion date      "

                />

            </mx:horizontalAxis>

            <mx:verticalAxis>

                 <mx:LinearAxis id="laAxisTitle" title="{PodContentBase._AxisTitle}"/>

              </mx:verticalAxis>

            <mx:series>

             <mx:ColumnSeries id="barseries"

                  dataProvider="{PodContentBase._SystemHistory}"

            yField="Breach"

            fillFunction="myFillFunction">

       

                </mx:ColumnSeries>

           

            </mx:series>

           

            </mx:ColumnChart>