Exemple #1
0
        internal virtual ChartLayoutFlags GetLayoutFlags(ChartLayoutContext context)
        {
            // check whether last layout context is valid
            if (this.lastLayoutContext.AvailableSize == InfinitySize)
            {
                return(ChartLayoutFlags.Size);
            }

            ChartLayoutFlags flags = ChartLayoutFlags.None;

            if (this.lastLayoutContext.AvailableSize != context.AvailableSize)
            {
                flags |= ChartLayoutFlags.Size;
            }
            if (this.lastLayoutContext.Scale != context.Scale)
            {
                flags |= ChartLayoutFlags.Zoom;
            }
            if (this.lastLayoutContext.PlotOrigin != context.PlotOrigin)
            {
                flags |= ChartLayoutFlags.Pan;
            }

            return(flags);
        }
Exemple #2
0
        public bool                               IsEmpty; // determines whether the EmptyContent of the chart is currently displayed

        public ChartLayoutContext(Size availableSize, Size scale, Point plotOrigin, RadRect clip)
        {
            this.AvailableSize = availableSize;
            this.Scale         = scale;
            this.PlotOrigin    = plotOrigin;
            this.ClipRect      = clip;
            this.Flags         = ChartLayoutFlags.None;
            this.IsEmpty       = false;
        }