mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-04 08:06:36 +08:00
项目结构调整
This commit is contained in:
60
Others/Live-Charts-master/Examples/WinForms/Cartesian/FunnelChart/FunnelExample.Designer.cs
generated
Normal file
60
Others/Live-Charts-master/Examples/WinForms/Cartesian/FunnelChart/FunnelExample.Designer.cs
generated
Normal file
@@ -0,0 +1,60 @@
|
||||
namespace Winforms.Cartesian.Funnel_Chart
|
||||
{
|
||||
partial class FunnelExample
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.cartesianChart1 = new LiveCharts.WinForms.CartesianChart();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cartesianChart1
|
||||
//
|
||||
this.cartesianChart1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.cartesianChart1.Location = new System.Drawing.Point(0, 0);
|
||||
this.cartesianChart1.Name = "cartesianChart1";
|
||||
this.cartesianChart1.Size = new System.Drawing.Size(662, 409);
|
||||
this.cartesianChart1.TabIndex = 0;
|
||||
this.cartesianChart1.Text = "cartesianChart1";
|
||||
//
|
||||
// FunnelExample
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(662, 409);
|
||||
this.Controls.Add(this.cartesianChart1);
|
||||
this.Name = "FunnelExample";
|
||||
this.Text = "FunnelExample";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private LiveCharts.WinForms.CartesianChart cartesianChart1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using LiveCharts;
|
||||
using LiveCharts.Wpf;
|
||||
using Color = System.Drawing.Color;
|
||||
using HorizontalAlignment = System.Windows.HorizontalAlignment;
|
||||
using Panel = System.Windows.Controls.Panel;
|
||||
|
||||
namespace Winforms.Cartesian.Funnel_Chart
|
||||
{
|
||||
public partial class FunnelExample : Form
|
||||
{
|
||||
public FunnelExample()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
//Credit https://dribbble.com/shots/2673159-Funnel-UI-concept
|
||||
//Icons http://www.flaticon.com/authors/madebyoliver
|
||||
|
||||
BackColor = Color.FromArgb(255, 20, 20, 75);
|
||||
|
||||
cartesianChart1.Series.Add(new LineSeries
|
||||
{
|
||||
Values = new ChartValues<double> {100, 85, 50, 35, 5, 3},
|
||||
Fill = new SolidColorBrush(System.Windows.Media.Color.FromRgb(33, 106, 254)),
|
||||
PointGeometry = null,
|
||||
AreaLimit = 0,
|
||||
StrokeThickness = 0
|
||||
});
|
||||
cartesianChart1.Series.Add(new LineSeries
|
||||
{
|
||||
Values = new ChartValues<double> {-100, -85, -50, -35, -5, 3},
|
||||
Fill = new SolidColorBrush(System.Windows.Media.Color.FromRgb(33, 106, 254)),
|
||||
PointGeometry = null,
|
||||
AreaLimit = 0,
|
||||
StrokeThickness = 0
|
||||
});
|
||||
|
||||
var s2 = new LineSeries
|
||||
{
|
||||
Values = new ChartValues<double> {110, 94, 60, 40, 10, 10},
|
||||
Fill = new SolidColorBrush(System.Windows.Media.Color.FromRgb(34, 44, 120)),
|
||||
PointGeometry = null,
|
||||
AreaLimit = 0,
|
||||
StrokeThickness = 0
|
||||
};
|
||||
var s3 = new LineSeries
|
||||
{
|
||||
Values = new ChartValues<double> {-110, -94, -60, -40, -10, -10},
|
||||
Fill = new SolidColorBrush(System.Windows.Media.Color.FromRgb(34, 44, 120)),
|
||||
PointGeometry = null,
|
||||
AreaLimit = 0,
|
||||
StrokeThickness = 0
|
||||
};
|
||||
var s4 = new LineSeries
|
||||
{
|
||||
Values = new ChartValues<double> {120, 104, 70, 50, 15, 15},
|
||||
Fill = new SolidColorBrush(System.Windows.Media.Color.FromRgb(20, 24, 89)),
|
||||
PointGeometry = null,
|
||||
AreaLimit = 0,
|
||||
StrokeThickness = 0
|
||||
};
|
||||
var s5 = new LineSeries
|
||||
{
|
||||
Values = new ChartValues<double> {-120, -104, -70, -50, -15, -15},
|
||||
Fill = new SolidColorBrush(System.Windows.Media.Color.FromRgb(20, 24, 89)),
|
||||
PointGeometry = null,
|
||||
AreaLimit = 0,
|
||||
StrokeThickness = 0
|
||||
};
|
||||
|
||||
Panel.SetZIndex(s2, -1);
|
||||
Panel.SetZIndex(s3, -1);
|
||||
Panel.SetZIndex(s4, -2);
|
||||
Panel.SetZIndex(s5, -2);
|
||||
|
||||
cartesianChart1.Series.Add(s2);
|
||||
cartesianChart1.Series.Add(s3);
|
||||
cartesianChart1.Series.Add(s4);
|
||||
cartesianChart1.Series.Add(s5);
|
||||
|
||||
cartesianChart1.AxisY.Add(new Axis { IsEnabled = false, ShowLabels = false });
|
||||
var section1 = new AxisSection
|
||||
{
|
||||
Value = 1.5,
|
||||
Stroke = new SolidColorBrush(System.Windows.Media.Color.FromArgb(38, 255, 255, 255)),
|
||||
StrokeThickness = 5
|
||||
};
|
||||
var section2 = new AxisSection
|
||||
{
|
||||
Value = 3.5,
|
||||
Stroke = new SolidColorBrush(System.Windows.Media.Color.FromArgb(38, 255, 255, 255)),
|
||||
StrokeThickness = 5
|
||||
};
|
||||
Panel.SetZIndex(section1, 1);
|
||||
Panel.SetZIndex(section2, 1);
|
||||
cartesianChart1.AxisX.Add(new Axis
|
||||
{
|
||||
IsEnabled = false,
|
||||
ShowLabels = false,
|
||||
Sections = new SectionsCollection
|
||||
{
|
||||
section1,
|
||||
section2
|
||||
}
|
||||
});
|
||||
|
||||
var userUri = new Uri(@"Cartesian/FunnelChart/Resources/user.png", UriKind.Relative);
|
||||
var fingerUri = new Uri("Cartesian/FunnelChart/Resources/fingerprint.png", UriKind.Relative);
|
||||
var viewUri = new Uri("Cartesian/FunnelChart/Resources/view.png", UriKind.Relative);
|
||||
|
||||
var ve1 = new VisualElement
|
||||
{
|
||||
X = 0.75,
|
||||
Y = 120,
|
||||
VerticalAlignment = VerticalAlignment.Bottom,
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
UIElement = new StackPanel
|
||||
{
|
||||
Children =
|
||||
{
|
||||
new Image {Source = new BitmapImage(userUri)},
|
||||
new TextBlock { Text = "LOADED THE AD", FontSize = 16, Foreground = Brushes.White}
|
||||
}
|
||||
}
|
||||
};
|
||||
var ve2 = new VisualElement
|
||||
{
|
||||
X = 0.75,
|
||||
Y = 0,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
UIElement = new TextBlock { Text = "100 %", FontSize = 40, Foreground = Brushes.White}
|
||||
};
|
||||
|
||||
var ve3 = new VisualElement
|
||||
{
|
||||
X = 2.5,
|
||||
Y = 120,
|
||||
VerticalAlignment = VerticalAlignment.Bottom,
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
UIElement = new StackPanel
|
||||
{
|
||||
Children =
|
||||
{
|
||||
new Image {Source = new BitmapImage(viewUri)},
|
||||
new TextBlock { Text = "SAW THE AD", FontSize = 16, Foreground = Brushes.White}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var ve4 = new VisualElement
|
||||
{
|
||||
X = 2.5,
|
||||
Y = 0,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
UIElement = new TextBlock { Text = "50 %", FontSize = 40, Foreground = Brushes.White }
|
||||
};
|
||||
|
||||
var ve5 = new VisualElement
|
||||
{
|
||||
X = 4.25,
|
||||
Y = 120,
|
||||
VerticalAlignment = VerticalAlignment.Bottom,
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
UIElement = new StackPanel
|
||||
{
|
||||
Children =
|
||||
{
|
||||
new Image {Source = new BitmapImage(fingerUri)},
|
||||
new TextBlock { Text = "INTERACTED", FontSize = 16, Foreground = Brushes.White}
|
||||
}
|
||||
}
|
||||
};
|
||||
var ve6 = new VisualElement
|
||||
{
|
||||
X = 4.25,
|
||||
Y = 0,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
UIElement = new TextBlock { Text = "100 %", FontSize = 40, Foreground = Brushes.White }
|
||||
};
|
||||
|
||||
cartesianChart1.VisualElements.AddRange(new[]
|
||||
{
|
||||
ve1, ve2, ve3, ve4, ve5, ve6
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 919 B |
Binary file not shown.
|
After Width: | Height: | Size: 647 B |
Binary file not shown.
|
After Width: | Height: | Size: 597 B |
Reference in New Issue
Block a user