Silverlight 雷达图和一种特殊泡泡画法

原文:Silverlight 雷达图和一种特殊泡泡画法

 

自上次发了雷达图,也没怎么说一下。

这次又做了一种图,继续共享一下,就是以一个点为中心,周围绕着几个点,用一个箭头与中心相连并带有某些信息。圆 和中心都可以响应鼠标事件。

我一向不会讲解所做的东西。所以大部分我直接上源码的。

简单讲解一下:

代码结构分为4部分,

1.

首先是画布,其实就是一个canvas因为现在只有二种图,

一个雷达画布 RadarCanvas(比较特殊),和一个二维坐标画布 CoorCanvas,都派生自ChartCanvas;

2.就是轴

坐标轴CoorAxis 和RadarAxis 都派生自IAxis,其实里面什么也没有。就是一个存一些值,比较这个轴的颜色,它的起始与终结坐标。雷达轴的角度偏移等,。

 

3.model

存值的类了,暂时有 clm泡泡图的点击事件参数 CLMArrowClickEventArg,DataPoint图坐标点,图点点击事件参数ItemClickEventArg,字段映射ItemMapping

 

4.图形

现有CLMBubbleSeries,它是一个特殊的泡泡图,我们项目中用到的。这里就不说它有什么用。只讲实现。

RadarSeries,它就是雷达图形

它们都继承自ISeries

 

核心就是讲Series怎么画的

 

首先看它们的基类:

View Code

/// <summary>
    /// 图表线或图接口
    /// </summary>
    public abstract class ISeries : Common.IBaseControl
    {
        public ISeries(ChartCanvas canvas)
        {
            Canvas = canvas;

            Points = new System.Collections.ObjectModel.ObservableCollection<Model.DataPoint>();

            ItemMappings = new System.Collections.ObjectModel.ObservableCollection<Model.ItemMapping>();
        }

        /// <summary>
        /// 动画执行时间
        /// </summary>
        protected const int AnimateDurtion = 1000;

        /// <summary>
        /// 项单击事件
        /// </summary>
        public EventHandler<Model.ItemClickEventArg> ItemClick;

        /// <summary>
        /// 画布
        /// </summary>
        public ChartCanvas Canvas { get; set; }

        /// <summary>
        /// 当前颜色
        /// </summary>
        public Brush Stroke
        {
            get;
            set;
        }

        /// <summary>
        /// 填充色
        /// </summary>
        public Brush Fill
        {
            get;
            set;
        }

        /// <summary>
        /// 图例名
        /// </summary>
        public string LegendLabel
        {
            get;
            set;
        }

        /// <summary>
        /// 当前线的label格式
        /// /// #Y=当前值,#YName=当前Y轴名称,#C{列名}=表示绑定当前数据对象的指定列值
        /// </summary>
        public string ItemTooltipFormat { get; set; }

        /// <summary>
        /// 当前绑定的对象
        /// </summary>
        public object DataContext { get; set; }

        /// <summary>
        /// 当前索引
        /// </summary>
        public int Index { get; set; }

        /// <summary>
        /// 图点
        /// </summary>
        public System.Collections.ObjectModel.ObservableCollection<Model.DataPoint> Points { get; set; }

        /// <summary>
        /// 当前图型属性映射
        /// </summary>
        public System.Collections.ObjectModel.ObservableCollection<Model.ItemMapping> ItemMappings
        {
            get;
            internal set;
        }

        /// <summary>
        /// 获取对象的属性的值
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public object GetValue(string name)
        {
            var mapping = GetMapping(name);
            if (mapping != null) name = mapping.MemberName;

            var obj = Common.Helper.GetPropertyName(DataContext, name);
            return obj;
        }

        /// <summary>
        /// 获取对象的值
        /// </summary>
        /// <param name="name">属性名</param>
        /// <returns></returns>
        public double GetNumberValue(string name)
        {
            double value = 0;
            var obj = GetValue(name);
            if (obj != null)
            {
                if (Silverlight.Common.Data.TypeHelper.IsNumber(obj.GetType()))
                {
                    if (!double.TryParse(obj.ToString(), out value))
                    {
                        value = Index + 1;
                    }
                }
                else
                {
                    value = Index + 1;
                }
            }
            return value;
        }

        /// <summary>
        /// 获取指定的字段映射
        /// </summary>
        /// <param name="dm"></param>
        /// <returns></returns>
        public Model.ItemMapping GetMapping(Model.ItemMapping.EnumDataMember dm)
        {
            foreach (var m in ItemMappings)
            {
                if (m.DataMember == dm) return m;
            }
            return null;
        }

        /// <summary>
        /// 获取指定的字段映射
        /// </summary>
        /// <param name="dm"></param>
        /// <returns></returns>
        public Model.ItemMapping GetMapping(string name)
        {
            foreach (var m in ItemMappings)
            {
                if (name.Equals(m.OldName, StringComparison.OrdinalIgnoreCase) ||
                    name.Equals(m.MemberName, StringComparison.OrdinalIgnoreCase) ||
                    name.Equals(m.DisplayName, StringComparison.OrdinalIgnoreCase))
                    return m;
            }
            return null;
        }

        /// <summary>
        /// 获取指定的字段映射
        /// </summary>
        /// <param name="dm"></param>
        /// <returns></returns>
        public System.Collections.Generic.IEnumerable<Model.ItemMapping> GetMappings(Model.ItemMapping.EnumDataMember dm)
        {
            var ms = (from m in ItemMappings
                      where m.DataMember == dm
                      select m).ToArray<Model.ItemMapping>();
            return ms;
        }

        /// <summary>
        /// 当前动画
        /// </summary>
        protected Storyboard storyboard;

        /// <summary>
        /// 展现
        /// </summary>
        public virtual void Draw()
        {
            var ps = CreatePath();
            foreach (var p in ps)
            {
                Canvas.AddChild(p);
            }
            if (storyboard != null && Canvas.IsAnimate)
            {
                storyboard.Begin();
            }
        }

        System.Collections.Generic.List<Shape> shaps=new System.Collections.Generic.List<Shape>();
        /// <summary>
        /// 当前线条
        /// </summary>
        public System.Collections.Generic.List<Shape> Shaps
        {
            get { return shaps; }
            protected set { shaps = value; }
        }

        /// <summary>
        /// 生成图形
        /// </summary>
        /// <returns></returns>
        public virtual System.Collections.Generic.IEnumerable<Shape> CreatePath()
        {
            return Shaps;
        }

        /// <summary>
        /// 生成图例
        /// </summary>
        /// <returns></returns>
        internal virtual StackPanel CreateLegend()
        {
            if (!string.IsNullOrWhiteSpace(LegendLabel))
            {
                var panel = new StackPanel();
                panel.Orientation = Orientation.Horizontal;
                var colorarea = new Rectangle();
                colorarea.Width = 20;
                colorarea.Height = 10;
                colorarea.Fill = this.Fill;
                colorarea.Stroke = this.Stroke;
                panel.Margin = new Thickness(2);
                panel.Children.Add(colorarea);

                var text = new TextBlock();
                text.Margin = new Thickness(2);

                var dic=new System.Collections.Generic.Dictionary<string,string>();
                foreach (var m in ItemMappings)
                {
                    if (!dic.ContainsKey("YName") && !string.IsNullOrWhiteSpace(m.DisplayName))
                    {
                        dic.Add("YName", m.DisplayName??m.MemberName);
                    }
                }

                text.Text = Common.Helper.DserLabelName(LegendLabel,dic ,
                        (string name) =>
                        {
                            return GetValue(name);
                        });
                text.Foreground = new SolidColorBrush(Colors.Black);
                panel.Children.Add(text);

                return panel;
            }
            return null;
        }

        /// <summary>
        /// 添加点的小圆圈,方便鼠标点中。并加提示
        /// </summary>
        /// <param name="center"></param>
        /// <param name="rotate"></param>
        protected Ellipse AddPoint(Point center, double rotate,object tooltip,Model.DataPoint p)
        {
            var circle = Common.Helper.CreateEllipse(center, rotate);
            circle.Stroke = this.Stroke;
            circle.Fill = this.Fill;
            ToolTipService.SetToolTip(circle, tooltip);

            if (this.ItemClick != null) {
                circle.Cursor = Cursors.Hand;
                circle.MouseLeftButtonUp += (sender, e) => {
                    var arg = new Model.ItemClickEventArg() {
                     Data=this.DataContext,
                      Item=p
                    };
                    ItemClick(circle,arg);
                };
            }

            Canvas.AddChild(circle);

            System.Windows.Controls.Canvas.SetZIndex(circle, Common.BaseParams.TooltipZIndex);

            return circle;
        }

        /// <summary>
        /// 生成提示信息
        /// #Y=当前值,#YName=当前Y轴名称,#C{列名}=表示绑定当前数据对象的指定列值
        /// </summary>
        /// <returns></returns>
        protected string CreateTooltip(string yName)
        {
            if (!string.IsNullOrWhiteSpace(this.ItemTooltipFormat))
            {
                var yvalue = GetValue(yName);
                var tmp = Common.Helper.DserLabelName(this.ItemTooltipFormat,
                    new System.Collections.Generic.Dictionary<string, string>() { { "YName", yName }, { "Y", yvalue==null?"":yvalue.ToString() } },
                    (string name) =>
                    {
                        return GetValue(name);
                    });
                return tmp;
            }
            return this.ItemTooltipFormat;
        }

        public void Show()
        {
            throw new NotImplementedException();
        }

        public void Hide()
        {
            throw new NotImplementedException();
        }
    }

嗯。没有很多东西,都是一些基础操作,和几个接口。

 

下面就可以看泡泡图CLMBubbleSeries:

其构造函数:

 public CLMBubbleSeries(CoorCanvas canvas)
            : base(canvas) {
                this.Stroke = new SolidColorBrush(Color.FromArgb(255, 51, 153, 255));
                this.Fill = new SolidColorBrush(Color.FromArgb(255, 188, 222, 255));
        }

初始化它的颜色。

最重要的是二个函数

View Code

/// <summary>
        /// 生成当前图形
        /// </summary>
        /// <returns></returns>
        public override System.Collections.Generic.IEnumerable<Shape> CreatePath()
        {
            if (storyboard != null) storyboard.Stop();
            if (Canvas.IsAnimate) this.storyboard = new Storyboard();

            this.Shaps.Clear();
            if (DataContext == null) return base.CreatePath();
            var data = DataContext as System.Collections.ICollection;

            var circlesize = data.Count > 20 ? circleSize / data.Count * 20 : circleSize;
            var center=new Point() { X = this.Canvas.Width / 2, Y = centerSize * 2.3 };
            var left = Canvas.Margin.Left + circlesize * 2;
            if (left <= circlesize / 2) left = circlesize + 2;
            var bottom = (center.Y + circlesize + centerSize);
            var maxbottom = Canvas.Height - Canvas.Margin.Bottom - circlesize - 4;
            //距离中心距离
            var radiacenter = Math.Min(center.X - left, maxbottom);
            var circleIndex = -1;            

            //小圆个数
            var circlecount = data.Count;
            var rotatestep = 3.78 / circlecount;//每个小圆的角度
            var mapping = GetMapping(Model.ItemMapping.EnumDataMember.Y);

            if (mapping == null) throw new Exception("至少需要指定一个Y轴字段映射");
            //与中心点关联设置
            var links = GetMappings(Model.ItemMapping.EnumDataMember.CLMLink);

            var tocentername="";
            //画泡泡
            foreach (var m in data)
            {
                if (m != null)
                {
                    var item = new Model.DataPoint();

                    item.PotinShape= new Path();
                    var v = Common.Helper.GetPropertyName(m, mapping.MemberName); ;
                    item.PointType = Model.DataPoint.EnumPointType.ChartPoint;
                    item.StringValue = v==null?"":v.ToString();
                    System.Windows.Controls.Canvas.SetZIndex(item.PotinShape, Common.BaseParams.ShapZIndex);

                    var el = new EllipseGeometry();
                    item.PotinShape.Data = el;

                    //画中心位置
                    if (circleIndex == -1)
                    {
                        item.Position = el.Center = center;
                        el.RadiusX = el.RadiusY = centerSize;
                        item.Width = item.Height = centerSize * 2;
                        tocentername = item.StringValue;
                        item.StringValue =(CenterName??mapping.MemberName) + "\n" + item.StringValue;

                        var label = item.CreateLabel();
                        //加入标签
                        Canvas.AddChild(label);

                        if (ItemClick != null)
                        {
                            label.Cursor = Cursors.Hand;
                            var centerdata = m;
                            label.MouseLeftButtonUp += (sender, e) =>
                            {
                                var arg = new Model.ItemClickEventArg()
                                {
                                    Data = centerdata,
                                    Item = item
                                };
                                ItemClick(sender, arg);
                            };
                        }

                        var tootip = CreateTooltip(m);
                        ToolTipService.SetToolTip(label,tootip);
                    }
                    //画边上的小圆
                    else
                    {
                        //初始化小圆点
                        InitPoint(el, item, rotatestep, circleIndex, radiacenter, center, maxbottom, circlesize, tocentername,circlecount,links,m);
                    }

                    if(Canvas.IsFillShape)item.PotinShape.Fill = this.Fill;
                    item.PotinShape.Stroke = this.Stroke;
                    item.PotinShape.StrokeThickness = Canvas.LineWidth;
                    this.Shaps.Add(item.PotinShape);

                    circleIndex++;
                }
            }

            return base.CreatePath();
        }

画一个中心圆 ,和用InitPoint来画周围的小圆。

View Code

/// <summary>
        /// 初始化项
        /// </summary>
        /// <param name="el"></param>
        /// <param name="item"></param>
        /// <param name="rotatestep"></param>
        /// <param name="circleIndex"></param>
        /// <param name="radiacenter"></param>
        /// <param name="center"></param>
        /// <param name="maxbottom"></param>
        /// <param name="circlesize"></param>
        /// <param name="tocentername"></param>
        private void InitPoint(EllipseGeometry el,Model.DataPoint item,
            double rotatestep, int circleIndex, double radiacenter, Point center,
            double maxbottom, double circlesize, string tocentername, int circlecount,
            System.Collections.Generic.IEnumerable<Model.ItemMapping> links,object data)
        {
            var position = new Point();
            var rotate = rotatestep * circleIndex + 2.95;
            var rsin = Math.Sin(rotate);
            var rcos = Math.Cos(rotate);
            //二圆偏移量
            var ystep = rsin * radiacenter;
            var xstep = rcos * radiacenter;

            position.X = center.X + xstep;
            position.Y = center.Y - ystep;

            if (position.Y >= maxbottom) position.Y = maxbottom;

            item.Position = position;
            el.RadiusX = el.RadiusY = circlesize;
            item.Width = item.Height = circlesize * 2;

            var arrow = new Controls.CLMArrow(Canvas);
            arrow.Fill = this.Fill;
            arrow.Stroke = this.Stroke;
            arrow.Rotate = rotate;
            arrow.ToName = tocentername;
            arrow.FromName = item.StringValue;
            arrow.RotateSin = rsin;
            arrow.RotateCos = rcos;

            var startystep = (circlesize) * arrow.RotateSin;
            var startxstep = (circlesize) * arrow.RotateCos;
            arrow.StartPoint = new Point(item.Position.X - startxstep, item.Position.Y + startystep);
            var endystep = centerSize * arrow.RotateSin;
            var endxstep = centerSize * arrow.RotateCos;
            arrow.EndPoint = new Point(center.X + endxstep, center.Y - endystep);

            if (links != null)
            {
                var count = links.Count<Model.ItemMapping>();
                if (count > 0)
                {
                    var lnk = links.ElementAt<Model.ItemMapping>(0);
                    var tmp = Common.Helper.GetPropertyName(data, lnk.MemberName);
                    if (!string.IsNullOrWhiteSpace(lnk.MarkName)) arrow.FromMarkName = lnk.MarkName;
                    arrow.FromValue = tmp == null ? "" : tmp.ToString();
                }
                if (count > 1)
                {
                    var lnk = links.ElementAt<Model.ItemMapping>(1);
                    var tmp = Common.Helper.GetPropertyName(data, lnk.MemberName);
                    if (!string.IsNullOrWhiteSpace(lnk.MarkName)) arrow.ToMarkName = lnk.MarkName;
                    arrow.ToValue = tmp == null ? "" : tmp.ToString();
                }
            }

            //设置箭头提示事件
            if (ArrowTooltipClick != null) arrow.SetClickEvent(ArrowTooltipClick);

            arrow.Draw();
            item.TargetControl = arrow;

            var label = item.CreateLabel();
            Canvas.AddChild(label);

            if (ItemClick != null)
            {
                label.Cursor = Cursors.Hand;
                label.MouseLeftButtonUp += (sender, e) =>
                {
                    var arg = new Model.ItemClickEventArg()
                    {
                        Data = data,
                        Item = item
                    };
                    ItemClick(sender, arg);
                };
            }

            if (Canvas.IsAnimate)
            {
                label.Visibility = Visibility.Collapsed;
                var anima = new PointAnimation();
                anima.To = position;
                anima.Duration = TimeSpan.FromMilliseconds(AnimateDurtion);

                Storyboard.SetTarget(anima, el);
                el.Center = center;
                Storyboard.SetTargetProperty(anima, new PropertyPath("Center"));

                var sizeanimax = new DoubleAnimation();
                sizeanimax.From = 0;
                sizeanimax.To = circlesize;
                Storyboard.SetTarget(sizeanimax, el);
                Storyboard.SetTargetProperty(sizeanimax, new PropertyPath("RadiusX"));

                var sizeanimay = new DoubleAnimation();
                sizeanimay.From = 0;
                sizeanimay.To = circlesize;
                Storyboard.SetTarget(sizeanimay, el);
                Storyboard.SetTargetProperty(sizeanimay, new PropertyPath("RadiusY"));

                anima.Completed += new EventHandler((sender, e) =>
                {
                    label.Visibility = Visibility.Visible;
                    InitMouseEvent(label, arrow);
                    if (circleIndex == circlecount / 2 - 1) {
                        arrow.Show();
                        currentShowedArrow = arrow;
                    }
                });
                this.storyboard.Children.Add(anima);
                this.storyboard.Children.Add(sizeanimax);
                this.storyboard.Children.Add(sizeanimay);
            }
            else
            {
                el.Center = position;
                //加入标签
                //var label = item.CreateLabel();
                //Canvas.AddChild(label);
                InitMouseEvent(label, arrow);
                if (circleIndex == circlecount / 2 - 1) {
                    arrow.Show();
                    currentShowedArrow = arrow;
                }
            }
        }

 

最后是画坐标图代码:

       /// <summary>
        /// 画坐标图
        /// </summary>
        private void DrawCoor()
        {
            if (!IsDrawBaseLine) return;

            coorGeometry.Figures.Clear();

            var xaxis = new Axis.CoorAxis();
            xaxis.AxisShap = coorPath;
            xaxis.AType = Axis.AxisType.XValue;

            var yaxis = new Axis.CoorAxis();
            yaxis.AType = Axis.AxisType.YValue;
            yaxis.AxisShap = coorPath;

            this.Axises.Add(xaxis);
            this.Axises.Add(yaxis);

            var coorfigure = new PathFigure();
            coorGeometry.Figures.Add(coorfigure);

            //画上箭头
            yaxis.StartPoint = coorfigure.StartPoint = new Point(Margin.Left, Margin.Top - arrowMargin);
            var tlp = new Point() { X = Margin.Left - arrowMargin, Y = Margin.Top + arrowMargin };
            coorfigure.Segments.Add(new LineSegment() { Point = tlp });
            coorfigure.Segments.Add(new LineSegment() { Point = tlp });
            coorfigure.Segments.Add(new LineSegment() { Point = coorfigure.StartPoint });
            var trp = new Point() { X = Margin.Left + arrowMargin, Y = Margin.Top + arrowMargin };
            coorfigure.Segments.Add(new LineSegment() { Point = trp });
            coorfigure.Segments.Add(new LineSegment() { Point = trp });
            coorfigure.Segments.Add(new LineSegment() { Point = coorfigure.StartPoint });

            //左侧Y轴
            yaxis.EndPoint = xaxis.StartPoint = new Point() { X = Margin.Left, Y = this.Height - Margin.Bottom };
            coorfigure.Segments.Add(new LineSegment() { Point = xaxis.StartPoint });
            //x轴
            xaxis.EndPoint = new Point() { X = this.Width - Margin.Right + arrowMargin, Y = xaxis.StartPoint.Y };
            coorfigure.Segments.Add(new LineSegment() { Point = xaxis.EndPoint });

            //画右箭头
            var brtp = new Point() { X = this.Width - Margin.Right - arrowMargin, Y = xaxis.EndPoint.Y - arrowMargin };
            var brbp = new Point() { X = brtp.X, Y = xaxis.EndPoint.Y + arrowMargin };
            coorfigure.Segments.Add(new LineSegment() { Point = brtp });
            coorfigure.Segments.Add(new LineSegment() { Point = brtp });
            coorfigure.Segments.Add(new LineSegment() { Point = xaxis.EndPoint });
            coorfigure.Segments.Add(new LineSegment() { Point = brbp });
            coorfigure.Segments.Add(new LineSegment() { Point = brbp });

            AddChild(coorPath);

            DrawLine();//画虚线
        }

        /// <summary>
        /// 画虚线
        /// </summary>
        private void DrawLine()
        {
            var w = this.Width - Margin.Left - Margin.Right;
            var h = this.Height - Margin.Top - Margin.Bottom;

            var vstep = h / HorizontalCount;

            for (var i = 1; i <= HorizontalCount; i++)
            {
                var l = new Line();
                l.StrokeLineJoin = PenLineJoin.Round;
                l.StrokeDashArray.Add(4);
                l.Stroke = DashColor;
                l.StrokeThickness = 1;
                l.X1 = Margin.Left;
                l.Y1 = this.Height - Margin.Bottom - (vstep * i);
                l.X2 = this.Width - Margin.Right;
                l.Y2 = l.Y1;
                AddChild(l);
            }

            var xstep = w / VerticalCount;
            for (var i = 1; i <= VerticalCount; i++)
            {
                var l = new Line();
                l.Stroke = DashColor;
                l.StrokeDashArray.Add(4);
                l.StrokeThickness = 1;
                l.X1 = Margin.Left + xstep * i;
                l.Y1 = Margin.Top;
                l.X2 = l.X1;
                l.Y2 = this.Height - Margin.Bottom;
                AddChild(l);
            }

 

 啊。我是正的不太会讲解。直接上源码算了

源码地址:源码

时间: 2024-09-13 10:35:53

Silverlight 雷达图和一种特殊泡泡画法的相关文章

Excel教程 如何绘制雷达图

今天本节教程就给大家介绍怎么通过excel快速制作雷达图. 具体操作步骤: 1.以下面表格为例制作雷达图,三个班每个科目成绩都罗列出来了. 2.选中该表格所有单元格 3.选择插入,点击其他图标下面的倒三角,再点击其中的雷达图的一种格式. 4.看到了吧,雷达图就制作出来了. 5.通过这个雷达图可以看到很多信息,比如乙班的语文和外语成绩最差,其余三科成绩都不错,有偏科现象,甲班的外语和物理成绩最差,需要追赶,丙班的化学和数学成绩较差等. 温馨提示:   雷达图最好同一标准内分析,差距过大则分析不好看

LINQ TO SQL实现雷达图

系统环境 本文介绍Linq to sql在实际工程中的例子,利用微软chart控件实现调查反馈表的雷达图(Radar Chart). 系统环境 Visual Studio 2010 +NET Framework 3.5+Microsoft SQL Server 2005+Window XP+ SP3 LINQ TO SQL采用配置式开发 微软chart控件,微软强大的图表控件参见:http://www.cnblogs.com/zfnh2002,可惜不支持Data Dig功能. 开发背景 问题提出

小白学数据分析-----&gt;Excel复合图之复合雷达图

最近和同行交流时看到一个复合图,该图是雷达图和饼图的组合图,看过觉得很有新意,自己经过尝试发现制作不是很复杂,实用性也比较好,今天就简单说说这个图的做法.关于雷达图的信息参考(http://wiki.mbalib.com/wiki/%E9%9B%B7%E8%BE%BE%E5%9B%BE%E5%88%86%E6%9E%90%E6%B3%95),今天就要简单的说说怎么做一个这种复合图. 首先我们来看两个图: 这种复合图在某些情况下能够展示出更多的信息,而同时阅读者不会感觉到很混乱.对于我们平时要完成

在Word文档中插入Cad图的3种方法

在word文件中插入我们绘制的cad图,方法大体上有三种,但是它们达到的效果却并不相同,有的显得精致些,有的显得粗糙些,根据我们写作的目的还要进行相应的再处理,这个过程有一些技巧,现在把它写下来,希望能给读者朋友以启发. 要在word文件中插入一个cad图,可以利用下面的三种方法来实现: 第一种,利用键盘上的"print screen sysrq"来抓取cad图,再通过系统自带的画图软件做进一步的修剪,去掉cad剪贴图中多余的部分,这项工作为了是能使图片在word文件中显示的足够的清晰

win8.1系统如何在表格数据中制作雷达图

  win8.1系统如何在表格数据中制作雷达图 具体方法如下: 1.在wps中新建一个工作簿,输入表格数据; 2.然后选中表格内容,点击插入--图表--雷达图; 3.添加好雷达图后是这样子的(如图),可以看见标题不正确,而且还没有说明; 4.然后我们修改标题和添加布局.修改标题删除原标题后直接修改就可以了.添加布局点击图表元素--快速布局,选择自己喜欢的布局; 5.当然,也可以选择不同格式的雷达图.点击图标样式--样式选择自己喜欢的图标格式; 6.你也可以设置雷达图上所要显示的数据点.点击图表删

如何在excle表中建立雷达图

  首先,我们新建一个数据表格,方便进行演示. 我们在菜单里面选择 "插入"--"图表" 我们在图标类型里面选择"雷达图",选择一个类型,点击"下一步" 我们在源数据框里面点击框选按钮框选数据. 重点就是选择好整个数据表格,框选之后界面如图所示.我们接着点击源数据按钮返回界面. 返回界面之后,就会出现一个原始的雷达图标,我们在系列里面选择"行",并且点击"下一步" 我们可以在"

c# epplus chart-EPPlus 怎么实现一张chart图存在两种图表类型

问题描述 EPPlus 怎么实现一张chart图存在两种图表类型 var chart = (worksheet.Drawings.AddChart("PieChart", eChartType.Pie3D) as ExcelPieChart); 通过上面的方法可以设置chart图中图表类型, 但是我要在一张chart图中插入一个折线图,一个柱形图,怎么为另一个图表定义类型

Discuz! X2 图片展示优化 让看图成为一种乐趣

中介交易 http://www.aliyun.com/zixun/aggregation/6858.html">SEO诊断 淘宝客 云主机 技术大厅 长久以来,人们从论坛里看图会有一些影响用户体验的细节:例如因图片过多.打开慢而产生的网页跳跃感,以缩略图纵向排列的图片展示方式比较单一,插入.未插入图片没有明显区分等等.Discuz! X2 特别针对图片显示方式进行优化,同时既能保留论坛传统阅读习惯,又能显著改善组图浏览的用户体验,让17890.html">浏览图片贴变成乐趣

源代码-用java将excle中表格数据生成一个雷达图,并存入PPT中

问题描述 用java将excle中表格数据生成一个雷达图,并存入PPT中 网上的很多代码都是写在一个jFrame上,但是我这个项目经理要求,不要出现这样的浮框 ,点击运行的话,直接在PPT里生成一个雷达图图片.我尝试了很多方法,就是不行, 希望有这方面经验的,帮忙说一下怎么做,最好有一个源代码参考一下! 解决方案 刚才有想直接用java画一个图,但是画雷达图的时候又出现了浮框..这个jFrame也太多 了...