1 Reply Latest reply on May 18, 2011 1:11 PM by Michelle5002

    Schedule type LineChart with clients and unavailable start and end dates

    Michelle5002

      I have been working on trying to get something in flex which will display a list of clients and their unavailability start and end dates.   I have attempted the line chart and the HLOC chart but have not seen success.  I do have the H or V grids working fine.  But getting the data to display in a line graph based upon start date and end date has been my challenge.  any suggestions

       

      Current Code:

       

          <s:Label x="0" y="5" text="Min Date" height="24" fontFamily="Times New Roman" verticalAlign="middle"/>
          <mx:DateField id="minDateField"
                        x="50" y="5"
                        formatString="MM-DD-YYYY"
                        selectedDate="{minDate}"
                        change="minDatefield_changeHandler(event)"/>
          <s:Label x="150"  y="5" text="Max Date" height="24" fontFamily="Times New Roman" verticalAlign="middle"/>
          <mx:DateField id="maxDateField"
                        x="200" y="5"
                        formatString="MM-DD-YYYY"
                        selectedDate="{maxDate}"
                        change="maxDatefield_changeHandler(event)"/>
          <mx:LineChart id="nonAvailsLC" x="0" y="40"
                        showDataTips="true"
                        dataProvider="{getNonAvailsResult.lastResult}"
                        creationComplete="nonAvailsLC_creationCompleteHandler(event)"
                        width="890" height="550">
              <mx:backgroundElements>
                  <mx:GridLines gridDirection="both"/>
              </mx:backgroundElements>
              <mx:horizontalAxis>
                  <mx:DateTimeAxis dataUnits="days" minimum="{minDate}" maximum="{maxDate}"
                                   labelUnits="days"/>
              </mx:horizontalAxis>       
              <mx:verticalAxis>
                  <mx:CategoryAxis categoryField="user" labelFunction="getName"/>
              </mx:verticalAxis>       
              <mx:series>
                  <mx:LineSeries xField="startDate" yField="user"
                                 form="horizontal"/>
              </mx:series>
          </mx:LineChart>