Commit 944c54df HZH

雷达图

1 个父辈 174488f4
// ***********************************************************************
// Assembly : HZH_Controls
// Created : 2019-09-25
//
// ***********************************************************************
// <copyright file="RadarLine.cs">
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace HZH_Controls.Controls
{
/// <summary>
/// Class RadarLine.
/// </summary>
public class RadarLine
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the values.
/// </summary>
/// <value>The values.</value>
public double[] Values { get; set; }
/// <summary>
/// Gets or sets the color of the line.
/// </summary>
/// <value>The color of the line.</value>
public Color? LineColor { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [show value text].
/// </summary>
/// <value><c>true</c> if [show value text]; otherwise, <c>false</c>.</value>
public bool ShowValueText { get; set; }
/// <summary>
/// Gets or sets the color of the fill.
/// </summary>
/// <value>The color of the fill.</value>
public Color? FillColor { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HZH_Controls.Controls
{
public class RadarPosition
{
public string Text { get; set; }
public double MaxValue { get; set; }
}
}
...@@ -59,6 +59,11 @@ ...@@ -59,6 +59,11 @@
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="Controls\Charts\PieChart\PieItem.cs" /> <Compile Include="Controls\Charts\PieChart\PieItem.cs" />
<Compile Include="Controls\Charts\RadarChart\RadarLine.cs" />
<Compile Include="Controls\Charts\RadarChart\RadarPosition.cs" />
<Compile Include="Controls\Charts\RadarChart\UCRadarChart.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ScrollBar\ScrollbarComponent.cs"> <Compile Include="Controls\ScrollBar\ScrollbarComponent.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
...@@ -233,7 +238,7 @@ ...@@ -233,7 +238,7 @@
<Compile Include="Controls\Menu\UCMenuParentItem.Designer.cs"> <Compile Include="Controls\Menu\UCMenuParentItem.Designer.cs">
<DependentUpon>UCMenuParentItem.cs</DependentUpon> <DependentUpon>UCMenuParentItem.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Controls\Meter\UCMeter.cs"> <Compile Include="Controls\FactoryControls\Meter\UCMeter.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="Controls\Navigation\UCCrumbNavigation.cs"> <Compile Include="Controls\Navigation\UCCrumbNavigation.cs">
......
...@@ -66,6 +66,7 @@ namespace Test ...@@ -66,6 +66,7 @@ namespace Test
tnCharts.Nodes.Add("柱状图"); tnCharts.Nodes.Add("柱状图");
tnCharts.Nodes.Add("饼状图"); tnCharts.Nodes.Add("饼状图");
tnCharts.Nodes.Add("曲线图"); tnCharts.Nodes.Add("曲线图");
tnCharts.Nodes.Add("雷达图");
this.tvMenu.Nodes.Add(tnCharts); this.tvMenu.Nodes.Add(tnCharts);
TreeNode tnFactory = new TreeNode(" 工业控件"); TreeNode tnFactory = new TreeNode(" 工业控件");
...@@ -222,6 +223,9 @@ namespace Test ...@@ -222,6 +223,9 @@ namespace Test
case "滚动图表": case "滚动图表":
AddControl(new UC.UCTestWaveChart() { Dock = DockStyle.Fill }); AddControl(new UC.UCTestWaveChart() { Dock = DockStyle.Fill });
break; break;
case "雷达图":
AddControl(new UC.UCTestRadarChart() { Dock = DockStyle.Fill });
break;
#endregion #endregion
#region 工业 English:Industry #region 工业 English:Industry
......
...@@ -212,6 +212,12 @@ ...@@ -212,6 +212,12 @@
<Compile Include="UC\UCTestProcess.Designer.cs"> <Compile Include="UC\UCTestProcess.Designer.cs">
<DependentUpon>UCTestProcess.cs</DependentUpon> <DependentUpon>UCTestProcess.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UC\UCTestRadarChart.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\UCTestRadarChart.Designer.cs">
<DependentUpon>UCTestRadarChart.cs</DependentUpon>
</Compile>
<Compile Include="UC\UCTestRollText.cs"> <Compile Include="UC\UCTestRollText.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -380,6 +386,9 @@ ...@@ -380,6 +386,9 @@
<EmbeddedResource Include="UC\UCTestProcess.resx"> <EmbeddedResource Include="UC\UCTestProcess.resx">
<DependentUpon>UCTestProcess.cs</DependentUpon> <DependentUpon>UCTestProcess.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UC\UCTestRadarChart.resx">
<DependentUpon>UCTestRadarChart.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\UCTestRollText.resx"> <EmbeddedResource Include="UC\UCTestRollText.resx">
<DependentUpon>UCTestRollText.cs</DependentUpon> <DependentUpon>UCTestRollText.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
...@@ -2016,7 +2016,7 @@ ...@@ -2016,7 +2016,7 @@
this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Name = "UCTestBtns"; this.Name = "UCTestBtns";
this.Size = new System.Drawing.Size(993, 793); this.Size = new System.Drawing.Size(635, 793);
this.Load += new System.EventHandler(this.UCTestBtns_Load); this.Load += new System.EventHandler(this.UCTestBtns_Load);
this.ucControlBase1.ResumeLayout(false); this.ucControlBase1.ResumeLayout(false);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
......
...@@ -9,6 +9,7 @@ using System.Windows.Forms; ...@@ -9,6 +9,7 @@ using System.Windows.Forms;
namespace Test.UC namespace Test.UC
{ {
[ToolboxItem(false)]
public partial class UCTestCurveChart : UserControl public partial class UCTestCurveChart : UserControl
{ {
public UCTestCurveChart() public UCTestCurveChart()
......
...@@ -10,6 +10,7 @@ using HZH_Controls.Controls; ...@@ -10,6 +10,7 @@ using HZH_Controls.Controls;
namespace Test.UC namespace Test.UC
{ {
[ToolboxItem(false)]
public partial class UCTestPieCharts : UserControl public partial class UCTestPieCharts : UserControl
{ {
public UCTestPieCharts() public UCTestPieCharts()
......
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Test.UC
{
public partial class UCTestRadarChart : UserControl
{
public UCTestRadarChart()
{
InitializeComponent();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!