Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RealTimeGraphX.UWP.Demo/RealTimeGraphX.UWP.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>RealTimeGraphX.UWP.Demo</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17134.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down
2 changes: 1 addition & 1 deletion RealTimeGraphX.UWP/RealTimeGraphX.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>RealTimeGraphX.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17134.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down
387 changes: 201 additions & 186 deletions RealTimeGraphX.WPF.Demo/MainWindow.xaml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion RealTimeGraphX.WPF.Demo/MainWindowVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,20 @@ public MainWindowVM()
Controller.Range.MaximumX = TimeSpan.FromSeconds(10);
Controller.Range.AutoY = true;
Controller.Range.AutoYFallbackMode = GraphRangeAutoYFallBackMode.MinMax;
Controller.Range.XStartBehavior = XStartBehavior.slideInFromRight ;

Controller.DataSeriesCollection.Add(new WpfGraphDataSeries()
{
Name = "Series",
Stroke = Colors.DodgerBlue,
Stroke = Colors.Red,
});

MultiController = new WpfGraphController<TimeSpanDataPoint, DoubleDataPoint>();
MultiController.Range.MinimumY = 0;
MultiController.Range.MaximumY = 1080;
MultiController.Range.MaximumX = TimeSpan.FromSeconds(10);
MultiController.Range.AutoY = true;
MultiController.Range.XStartBehavior = XStartBehavior.fillFromLeft ;

MultiController.DataSeriesCollection.Add(new WpfGraphDataSeries()
{
Expand Down
4 changes: 2 additions & 2 deletions RealTimeGraphX.WPF.Demo/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 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")]
[assembly: AssemblyVersion("1.0.0.3")]
[assembly: AssemblyFileVersion("1.0.0.3")]
5 changes: 0 additions & 5 deletions RealTimeGraphX.WPF.Demo/RealTimeGraphX.WPF.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
</ApplicationDefinition>
<Compile Include="Converters\ObjectEqualityConverter.cs" />
<Compile Include="ListGraphItemVM.cs" />
<Compile Include="WpfGraphControl.cs" />
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand All @@ -71,10 +70,6 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="MainWindowVM.cs" />
Expand Down
55 changes: 0 additions & 55 deletions RealTimeGraphX.WPF.Demo/Themes/Generic.xaml

This file was deleted.

73 changes: 0 additions & 73 deletions RealTimeGraphX.WPF.Demo/WpfGraphControl.cs

This file was deleted.

8 changes: 4 additions & 4 deletions RealTimeGraphX.WPF/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
[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
// 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)]

Expand Down Expand Up @@ -51,5 +51,5 @@
// 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")]
[assembly: AssemblyVersion("1.0.0.3")]
[assembly: AssemblyFileVersion("1.0.0.3")]
1 change: 1 addition & 0 deletions RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<Compile Include="WpfGraphAxisControl.cs" />
<Compile Include="WpfGraphAxisPanel.cs" />
<Compile Include="WpfGraphAxisTickData.cs" />
<Compile Include="WpfGraphControl.cs" />
<Compile Include="WpfGraphGridLines.cs" />
<Compile Include="WpfGraphComponentBase.cs" />
<Compile Include="WpfGraphDataSeries.cs" />
Expand Down
110 changes: 107 additions & 3 deletions RealTimeGraphX.WPF/Themes/Generic.xaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
<ResourceDictionary
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:RealTimeGraphX.WPF">

<!-- Converters -->
<BooleanToVisibilityConverter x:Key="BoolToVis" />

<Style x:Key="AxisCaptionStyle" TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="10"/>
<!-- These triggers hide the TextBlock if the text is empty.
I have placed the captions in a grid column/row with Width/Height = "Auto",
so they should collapse completely if there is no caption. -->
<Style.Triggers>
<Trigger Property="Text" Value="">
<Setter Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Visibility" Value="Collapsed" />
</Trigger>
</Style.Triggers>
</Style>

<Style TargetType="{x:Type local:WpfGraphSurface}">
<Setter Property="ToolTipTemplate">
<Setter.Value>
<DataTemplate>
<Border
<Border
Opacity="0.8"
BorderThickness="1"
BorderThickness="1"
Padding="10 5"
CornerRadius="5"
BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphSurface},Path=BorderBrush}"
Expand Down Expand Up @@ -171,4 +191,88 @@
</Setter.Value>
</Setter>
</Style>

<Style TargetType="{x:Type local:WpfGraphControl}">
<Setter Property="StringFormatX" Value="hh\:mm\:ss"></Setter>
<Setter Property="StringFormatY" Value="0.0"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="BorderBrush" Value="#FF2E2E2E"></Setter>
<Setter Property="Padding" Value="20 20 30 20"></Setter>
<Setter Property="FontSize" Value="11"></Setter>
<!--<Setter Property="Foreground" Value="DodgerBlue"></Setter>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" >
<GradientStop Color="Black"/>
<GradientStop Color="#FF333333" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:WpfGraphControl}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
Padding="{TemplateBinding Padding}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>

<!-- Y Caption -->
<TextBlock Grid.Row="0" Grid.Column="0" Text="{TemplateBinding AxisCaptionY}" Style="{StaticResource AxisCaptionStyle}">
<TextBlock.LayoutTransform>
<RotateTransform Angle="-90"/>
</TextBlock.LayoutTransform>
</TextBlock>

<!-- Plot area -->
<Grid Grid.Row="0" Grid.Column="2">
<local:WpfGraphGridLines Controller="{TemplateBinding Controller}"
Foreground="{TemplateBinding GridLinesBrush}"
Rows="{TemplateBinding DivisionsY}"
Columns="{TemplateBinding DivisionsX}"/>
<local:WpfGraphSurface x:Name="surface" Controller="{TemplateBinding Controller}" DisplayToolTip="{TemplateBinding DisplayToolTip}" BorderThickness="1" BorderBrush="{TemplateBinding Foreground}" />
</Grid>

<!-- Y Axis -->
<!-- For some reason, TemplateBinding on the width does not work. -->
<local:WpfGraphAxisControl Orientation="Vertical"
Controller="{TemplateBinding Controller}"
Grid.Column="1"
Grid.Row="0"
Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=WidthAxisY}"
Divisions="{TemplateBinding DivisionsY}"
Visibility="{TemplateBinding ShowAxisY, Converter={StaticResource BoolToVis}}"
StringFormat="{TemplateBinding StringFormatY}" />

<!-- X Axis -->
<local:WpfGraphAxisControl Orientation="Horizontal"
Controller="{TemplateBinding Controller}"
Grid.Column="2"
Grid.Row="1"
Height="35"
Divisions="{TemplateBinding DivisionsX}"
Visibility="{TemplateBinding ShowAxisX, Converter={StaticResource BoolToVis}}"
StringFormat="{TemplateBinding StringFormatX}"/>

<!-- X Caption -->
<TextBlock Grid.Column="2" Grid.Row="2" Text="{TemplateBinding AxisCaptionX}" Style="{StaticResource AxisCaptionStyle}"/>

</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

</ResourceDictionary>
Loading