1)The first image(New Trend Graph.png) shows the graph with straight lines. But I don't want the straight lines.
(2)The second image(Merged batch Parameterwise Trend.png) shows the expected resulted image using C# WPF visualization.
Even I am using the style looking like this. Inspite of using StrokeLineJoin Property , I am not getting the expected result.
<Style x:Key="DashedPolyLine" TargetType="{x:Type Polyline}">
<Setter Property="StrokeThickness" Value="2" />
<Setter Property="StrokeDashCap" Value="Round"></Setter>
<Setter Property="Stroke" Value="Red" />
<Setter Property="StrokeDashArray" Value="0,1,0,1"/>
<Setter Property="Visibility" Value="Visible"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="StrokeStartLineCap" Value="Round"/>
<Setter Property="StrokeEndLineCap" Value="Round"/>
<Setter Property="Opacity" Value="1"></Setter>
<Setter Property="StrokeLineJoin" Value="Round"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="StrokeThickness" Value="4" />
</Trigger>
</Style.Triggers>
</Style>
What I have tried:
I displayed the whole XAML code for my application:
<Window x:Class="GraphTest.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:local="clr-namespace:GraphTest"
mc:Ignorable="d"
Title="MainWindow"
Height="550"
Width="1011"
xmlns:DVC="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
>
<window.resources>
<!--<Setter Property="Background" Value="{Binding Path=BatchTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>-->
<!--Value="{DynamicResource line1}"-->
<Setter Property="Template" Value="{x:Null}"/>
<Setter Property="StrokeThickness" Value="2" />
<Setter Property="StrokeDashCap" Value="Round"></setter>
<Setter Property="Stroke" Value="Red" />
<Setter Property="StrokeDashArray" Value="0,1,0,1"/>
<Setter Property="Visibility" Value="Visible"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="StrokeStartLineCap" Value="Round"/>
<Setter Property="StrokeEndLineCap" Value="Round"/>
<Setter Property="Opacity" Value="1"></setter>
<Setter Property="StrokeLineJoin" Value="Round"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="StrokeThickness" Value="4" />
</trigger>
</style.Triggers>
<grid>
<dvc:chart>
<dvc:chart.axes>
<DVC:LinearAxis x:Name="XAxis" Orientation="X" Title="Time" Margin="0,0,169,0" ShowGridLines="True">
<dvc:linearaxis.gridlinestyle>
<Setter Property="Stroke" Value="Black"/>
<Setter Property="StrokeThickness" Value="1"/>
<Setter Property="StrokeDashArray" Value="2,4"/>
<DVC:LinearAxis x:Name="YAxis" Orientation="Y" Title="Temp" ShowGridLines="True">
<dvc:linearaxis.gridlinestyle>
<Setter Property="Stroke" Value="Black"/>
<Setter Property="StrokeThickness" Value="1"/>
<Setter Property="StrokeDashArray" Value="2,4"/>
<dvc:chart.series>
<DVC:LineSeries x:Name="Series1"
DependentValuePath="Value"
DataPointStyle="{StaticResource InvisiblePointStyle}"
IndependentValuePath="Key"
PolylineStyle="{DynamicResource DashedPolyLine}"/>
Can anyone help me to find this?