Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
martinivanoff committed Jul 26, 2018
1 parent 2399d32 commit b51d2cd
Show file tree
Hide file tree
Showing 92 changed files with 44,728 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ChartView3D/WPF/ChartView3D_WPF.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2018
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefaultVisualMaterialSelector", "DefaultVisualMaterialSelector\DefaultVisualMaterialSelector.csproj", "{EF6ECB56-6E40-47A1-A3BB-C61D03679F46}"
EndProject
Expand All @@ -19,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataPointColorizer", "DataP
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SurfaceProjection", "SurfaceProjection\SurfaceProjection.csproj", "{C3ED42D2-AB90-41F4-8876-1FFA7039A51A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StackedBars3D", "StackedBars3D\StackedBars3D.csproj", "{AC8A967E-D693-4141-BADB-B177601664D5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -57,9 +59,16 @@ Global
{C3ED42D2-AB90-41F4-8876-1FFA7039A51A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3ED42D2-AB90-41F4-8876-1FFA7039A51A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3ED42D2-AB90-41F4-8876-1FFA7039A51A}.Release|Any CPU.Build.0 = Release|Any CPU
{AC8A967E-D693-4141-BADB-B177601664D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC8A967E-D693-4141-BADB-B177601664D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC8A967E-D693-4141-BADB-B177601664D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC8A967E-D693-4141-BADB-B177601664D5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F1D79F79-2BD5-47B1-8A77-B376E8B58958}
EndGlobalSection

EndGlobal
9 changes: 9 additions & 0 deletions ChartView3D/WPF/StackedBars3D/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="StackedBars3D.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:StackedBars3D"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
16 changes: 16 additions & 0 deletions ChartView3D/WPF/StackedBars3D/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;

namespace StackedBars3D
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
51 changes: 51 additions & 0 deletions ChartView3D/WPF/StackedBars3D/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<Window x:Class="StackedBars3D.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local="clr-namespace:StackedBars3D"
mc:Ignorable="d"
Title="MainWindow">
<Grid>
<telerik:RadCartesianChart3D>
<telerik:RadCartesianChart3D.XAxis>
<telerik:CategoricalAxis3D />
</telerik:RadCartesianChart3D.XAxis>
<telerik:RadCartesianChart3D.YAxis>
<telerik:CategoricalAxis3D />
</telerik:RadCartesianChart3D.YAxis>
<telerik:RadCartesianChart3D.ZAxis>
<telerik:LinearAxis3D LabelFormat="C0"/>
</telerik:RadCartesianChart3D.ZAxis>
<telerik:RadCartesianChart3D.Series>
<telerik:BarSeries3D x:Name="series"
XValueBinding="XCategory"
YValueBinding="YCategory"
ZValueBinding="ZValue"
ItemsSource="{Binding}">
<telerik:BarSeries3D.DefaultVisualGeometry>
<MeshGeometry3D Positions="0.2 0.2 0 0.2 0.2 1 0.2 0.8 1 0.2 0.8 0
0.8 0.8 0 0.8 0.8 1 0.8 0.2 1 0.8 0.2 0"
TriangleIndices="0 1 2 0 2 3
2 5 3 3 5 4
4 5 7 7 5 6
0 7 6 0 6 1
2 1 6 5 2 6"
TextureCoordinates="0.5 0 0.5 1 0.5 1 0.5 0
0.5 0 0.5 1 0.5 1 0.5 0" />
</telerik:BarSeries3D.DefaultVisualGeometry>
<telerik:BarSeries3D.DefaultVisualMaterialSelector>
<local:StackedBarsMaterialSelector />
</telerik:BarSeries3D.DefaultVisualMaterialSelector>
</telerik:BarSeries3D>
</telerik:RadCartesianChart3D.Series>
<telerik:RadCartesianChart3D.Grid>
<telerik:CartesianChart3DGrid />
</telerik:RadCartesianChart3D.Grid>
<telerik:RadCartesianChart3D.Behaviors>
<telerik:Chart3DCameraBehavior Distance="3800" />
</telerik:RadCartesianChart3D.Behaviors>
</telerik:RadCartesianChart3D>
</Grid>
</Window>
45 changes: 45 additions & 0 deletions ChartView3D/WPF/StackedBars3D/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows;

namespace StackedBars3D
{
public partial class MainWindow : Window
{
private static Random r = new Random(0);

public MainWindow()
{
InitializeComponent();
this.DataContext = this.GetData();
}

private ObservableCollection<PlotInfo> GetData()
{
var xCategories = new List<string>() { "Jan", "Feb", "Mar" };
var yCategories = new List<string>() { "2017", "2018", "2019" };

var result = new ObservableCollection<PlotInfo>();

for (int i = 0; i < xCategories.Count; i++)
{
for (int k = 0; k < yCategories.Count; k++)
{
var plotInfo = new PlotInfo() { StackedZValues = new List<double>() };
plotInfo.XCategory = xCategories[i];
plotInfo.YCategory = yCategories[k];

for (int y = 0; y < 3; y++)
{
plotInfo.StackedZValues.Add(r.Next(100, 3000));
}

result.Add(plotInfo);
}
}

return result;
}
}
}
17 changes: 17 additions & 0 deletions ChartView3D/WPF/StackedBars3D/PlotInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Collections.Generic;
using System.Linq;

namespace StackedBars3D
{
public class PlotInfo
{
public string XCategory { get; set; }
public string YCategory { get; set; }
public List<double> StackedZValues { get; set; }

public double ZValue
{
get { return this.StackedZValues.Sum(); }
}
}
}
55 changes: 55 additions & 0 deletions ChartView3D/WPF/StackedBars3D/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("StackedBars3D")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("StackedBars3D")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.

//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]


[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]


// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
71 changes: 71 additions & 0 deletions ChartView3D/WPF/StackedBars3D/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b51d2cd

Please sign in to comment.