zoukankan      html  css  js  c++  java
  • MsChart<4.2> 雷达图Radar Chart

     雷达图(有多个产品时):

    <asp:Chart ID="Chart2" runat="server" Width="898px" Height="800px" BorderlineDashStyle="Solid" BorderlineColor="Gray" BackGradientStyle="DiagonalLeft" BackSecondaryColor="AliceBlue" BackColor="WhiteSmoke">
    <Legends>
    <asp:Legend Alignment="Center" Docking="Top" Name="Legend1" Title="Benchmark Phone">
    </asp:Legend>
    </Legends>
    <Series>
    <%-- <asp:Series Name="Series1" ChartType="Radar">
    </asp:Series>
    <asp:Series Name="Series2">
    </asp:Series>
    --%>
    </Series>
    <ChartAreas>
    <asp:ChartArea Name="ChartArea1">
    <AxisY>
    <MajorGrid LineColor="#999999" LineDashStyle="Solid" />
    </AxisY>
    <AxisX>
    <MajorGrid LineColor="#999999" LineDashStyle="Solid" />
    <LabelStyle Font="Microsoft Sans Serif, 8pt" />
    </AxisX>
    </asp:ChartArea>
    </ChartAreas>
    </asp:Chart>

    后台代码:数据库就不上了,就是多个4.1的样子

    View Code
     1 Report2BLL reportBLL = new Report2BLL();
    2 Random rd = new Random(175);
    3 for (int i = 0; i < dtPhone.Rows.Count; i++)
    4 {
    5 Chart2.Series.Add(dtPhone.Rows[i]["PhoneName"].ToString());//
    6 int phoneID = Int32.Parse(dtPhone.Rows[i]["PhoneID"].ToString());
    7 DataTable dt = reportBLL.GetFeatureScore(phoneID);
    8 Chart2.Series[i].Points.DataBind(dt.DefaultView, "FeatureName", "Score", "LegendText=FeatureName,YValues=Score,ToolTip=Score");
    9 Chart2.Series[i].ChartType = SeriesChartType.Radar;
    10 Color color = Color.FromArgb(rd.Next(0, 255), rd.Next(0, 255), rd.Next(0, 255));
    11 Chart2.Series[i].BorderColor = color;
    12 Chart2.Series[i].BorderWidth = 2;
    13 Chart2.Series[i].Color = Color.Transparent;//设置Radar区域颜色透明,以防止前面的遮挡后面的显示
    14 Chart2.Series[i].IsValueShownAsLabel = true;//图表显示具体的数值
    15 }
    16 Chart2.DataBind();



    Be the change you want to see in the world.
  • 相关阅读:
    springboot springcloud zuul 过滤器
    springboot springcloud eureka 熔断器
    javaweb servlet filter
    maven nexus 搭建私服(二)
    springboot springcloud zuul 网关入门
    springboot springcloud 配置中心
    springboot springcloud eureka 入门
    java rabbitmq
    java jvm调优
    maven nexus 搭建私服(一)
  • 原文地址:https://www.cnblogs.com/eva_2010/p/2284977.html
Copyright © 2011-2022 走看看