开发者

Can I make a Flex line chart not purge values past max/min values

开发者 https://www.devze.com 2023-02-24 17:23 出处:网络
I want to use min/max values not to restrict what values exist but what values are shown. I am having issues with both X and Y axes and not sure if flex is capable of doing what I want...

I want to use min/max values not to restrict what values exist but what values are shown.

I am having issues with both X and Y axes and not sure if flex is capable of doing what I want...

on the Y axis

I am showing different days, and I want the scale to be the same on all the charts, but there is no absolute maximum value. I set the maximum to 18 which works great until a point with the value of 24 shows up. And instead of the line going off the chart or showing as high as it goes, it is simply removed from the dataset. Is there a way to keep it in the data set and still show it somehow? Like charts where arrows indicate out of range values and still allow you to access them?

on the X axis

I have a line chart that is plotting a changing value (captured at irregular intervals) over the course of a day. As of now because I have the DateTimeAxis restricted to a 24 hour period (how I want it) there is dead space before the first and after the last data point.

I'd like the line to continue if there is a following or preceding data point available. I am providing the following and preceding data points to the chart. But the chart is just ignoring datapoints outside of the range instead of continuing the line off the edge. Is there any way I can render the whole series but only show a specific 24 hours of it?

   private function loadDayComplete():void
        {   
            minChartDate = new Date;
            minChartDate.fullYear = currentDate.fullYear;
            minChartDate.month = currentDate.month;
            minChartDate.date = currentDate.date;
            minChartDate.hours = offset;
            minChartDate.minutes=0;
            minChartDate.seconds=0;
            minChartDate.milliseconds=0;
            maxChartDate = new Date;
            maxChartDate.time = minChartDate.time + 1000*60*60*24;

            glucoseSeries.dataProvider = bgResults;
            bgTimeAxis.minimum = minChartDate;
            bgTimeAxis.maximum = maxChartDate; 


<mx:LineChart  showDataTips="true" id="GlucoseChart">
    <mx:horizontalAxis>
        <mx:DateTimeAxis id="bgTimeAxis" dataUnits="minutes" parseFunction="parseDateString" displayLocalTime="true" />
    </mx:horizontalAxis>
    <mx:series>
        <mx:LineSeries id="glucoseSeries" showDataEffect="{da开发者_Python百科taIn}" radius="10" width="100" form="curve" displayName="BG" yField="Value" xField="DateTime">
            <mx:itemRenderer>
                <fx:Component>
                    <skins:MealBlobItemRenderer/>
                </fx:Component>
            </mx:itemRenderer>
        </mx:LineSeries>            
    </mx:series>
    
</mx:LineChart>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号