Unfortunately there isn't much to show, only the MXML. If I use 
Hours or even days it won't show because it is the same day for the 
start and end Dates.  And because there are no hours in that date it 
won't render it.  I haven't started with Ely's suggestion on 
overriding the bar series, but my guess is that's how I have to do 
it.

Here's the MXML:


<?xml version="1.0" encoding="utf-8"?>
<mx:BarChart xmlns:mx="http://www.adobe.com/2006/mxml"; 
showDataTips="true"
        dataTipFunction="formatDataTip" itemClick="getInfo
(event.hitData.item)" backgroundElements="{bge}" ><!--
backgroundElements="{bge}"-->
<mx:Script>
        <![CDATA[

        import mx.charts.HitData;
        import mx.managers.PopUpManager;
                
                private function getInfo(item:Object):void{
                        var projectWin:projectWindow = projectWindow
(PopUpManager.createPopUp( this, projectWindow , true))
                        projectWin.title = item.projectName
                        projectWin.projectDataHolder.dgChangeHandler
(item);
                //
                        //trace(item.toString());
                }
                public function display(data:Object, field:String, 
index:Number, percentValue:Number):String {
                var length:int = data.toString().length;
                if (length > 20){
                        return data.toString().substr(0, 20) + "...";
                } else {
                        return data.toString();
                }
                }
                //
                public function myParseFunction(s:String):Date { 
                // Get an array of Strings from the comma-separated 
String passed in.
                var a:Array = s.split(",");
                // Create the new Date object.
                var newDate:Date = new Date(a[0],a[1],a[2]);
                return newDate;
            }
            //
                public function formatDataTip
(hitData:HitData):String {
            var s:String;
            var result:Array;
            var thisDate:String;
            //start\\
            s = hitData.item.projectName;
            var sd:String = hitData.item.startDate;
            result = sd.split(",");
            thisDate = result[0] + "/" + result[1] + "/" + result
[2]; 
            var formattedSDate:String = myDate.format(thisDate);
            //end\\
                        var ed:String = hitData.item.endDate;
                        result = ed.split(",");
            thisDate = result[0] + "/" + result[1] + "/" + result[2];
            var formattedEDate:String = myDate.format(thisDate);
            //
            s += "\n\n<b>Start Date:     End Date:</b> \n"
            s += formattedSDate + "     " + formattedEDate;
            return s
                }
                //
        ]]>
</mx:Script>
        <!-- date formatter -->
        <mx:DateFormatter id="myDate" formatString="D, MMM 'YY" />
        <!---->
        <mx:SeriesSlide duration="1000" direction="down" 
minimumElementDuration="20" elementOffset="30" id="slideDown"/>
        <mx:SeriesSlide duration="1000" direction="up" 
minimumElementDuration="20" elementOffset="30" id="slideUp"/>

        <mx:Array id="bge">
     <mx:GridLines direction="horizontal">
             <mx:horizontalStroke>
                <mx:Stroke weight="1" color="#C2D1E1"/>
             </mx:horizontalStroke>
        <mx:horizontalFill>
           <mx:SolidColor color="#EEF3F7" alpha="1"/>
        </mx:horizontalFill>
     </mx:GridLines>
  </mx:Array>

        <mx:series>
                <mx:BarSeries xField="startDate" minField="endDate" 
hideDataEffect="slideUp" showDataEffect="slideDown">
                        <mx:fill>
                                <!--<mx:SolidColor color="#CCCC66"/>-
->
                                <mx:LinearGradient angle="90">
                                        <mx:entries>
                                                <mx:GradientEntry 
color="#FF9900" ratio="0"  />
                                                <mx:GradientEntry 
color="#FFCC00" ratio=".20"  />
                                                <mx:GradientEntry 
color="#A35901" ratio=".40"  />
                                                <mx:GradientEntry 
color="#2B1500" ratio=".85"  />
                                                <mx:GradientEntry 
color="#990099" ratio=".95"  />
                                        </mx:entries>   
                                </mx:LinearGradient>
                        </mx:fill>
                </mx:BarSeries>
        </mx:series>
        
                <mx:verticalAxis>
                        <mx:CategoryAxis labelFunction="display" 
categoryField="projectName" />
                </mx:verticalAxis>
                
        <mx:horizontalAxis>
                <mx:DateTimeAxis labelUnits="months" 
dataUnits="days" displayLocalTime="true" 
parseFunction="myParseFunction" />
        </mx:horizontalAxis>
        
</mx:BarChart>




--- In [email protected], "Igor Costa" <[EMAIL PROTECTED]> 
wrote:
>
> Mark
> 
> I don't think this could be a problem in render, could you please 
paste part
> of your code to be see what are you trying to do ?
> 
> Maybe could help us to figure out more your problem.
> 
> Best
> 
> Igor Costa
> www.igorcosta.org
> 
> 
> On 3/7/07, Mark <[EMAIL PROTECTED]> wrote:
> >
> >   I'm using a bar chart to show the start and end of a product 
roll-out.
> > I'm using the xField as the start date and the minField as the 
end
> > date, it works and looks real nice. The one problem I've run into
> > though is the product(s) that roll out in one day. So if the 
start
> > and end dates are the same I don't get a rendering of a bar... 
not
> > even a little.
> >
> > Does anyone one have any advice on how to force those bars to 
render?
> > Maybe there's a way to set a min width to it that I can't find? 
Or
> > maybe someone else has run into this kind of thing?
> >
> > Thanks, Mark --
> >
> >  
> >
> 
> 
> 
> -- 
> ----------------------------
> Igor Costa
> www.igorcosta.org
> www.igorcosta.com
> skype: igorpcosta
>


Reply via email to