This is an old revision of the document!


ComponentOne Controls

Chart

Example of Audiogram using C1Chart:

<Window...
    xmlns:c1chart="http://schemas.componentone.com/xaml/c1chart"    
    xmlns:c1ext="http://schemas.componentone.com/wpf/C1Extended"
    xmlns:c1="http://schemas.componentone.com/wpf/Basic"  
    xmlns:c1grid="http://schemas.componentone.com/wpf/C1DataGrid" 
    >
...
 
<Border Background="White" BorderBrush="LightGray" BorderThickness="2" CornerRadius="10,10,10,10">
	<c1chart:C1Chart Name="chartAudiogramBinaural" ChartType="LineSymbolsSmoothed" Margin="5">
		<c1chart:C1Chart.View>
			<c1chart:ChartView>
				<c1chart:ChartView.AxisX>
					<!--<c1chart:Axis Max="9" Min="0" MajorUnit="1" MajorGridStroke="DarkGray" LogBase="10">-->
					<c1chart:Axis Min=".1" Max="10" MajorUnit="1" MajorGridStroke="Transparent" MinorUnit=".250" LogBase="10" MajorTickThickness="1" MinorTickThickness="0">
						<c1chart:Axis.Title>
							<TextBlock Foreground="Crimson" Text="Frequency (Hz)" TextAlignment="Center" />
						</c1chart:Axis.Title>
					</c1chart:Axis>
				</c1chart:ChartView.AxisX>
				<c1chart:ChartView.AxisY>
					<c1chart:Axis AutoMax="False" AutoMin="False" MajorUnit="20" Max="125" Min="-10" MajorGridStroke="LightGray" Reversed="True">
						<c1chart:Axis.Title>
							<TextBlock Foreground="Crimson" Text="Hearing Level (dB)" TextAlignment="Center" />
						</c1chart:Axis.Title>
					</c1chart:Axis>
				</c1chart:ChartView.AxisY>
			</c1chart:ChartView>
		</c1chart:C1Chart.View>
		<c1chart:C1Chart.Data>
			<c1chart:ChartData>
				<!--<c1chart:ChartData.ItemNames>100 250 500 750 1k . 1.5k . 2k . . . . . . . 4k 8k . 10k</c1chart:ChartData.ItemNames>-->
				<!--<c1chart:ChartData.ItemNames>125 250 500 1k 2k 4k 8k</c1chart:ChartData.ItemNames>-->
				<c1chart:ChartData.ItemNames>250 1k 2k . 4k . 6k . 8k</c1chart:ChartData.ItemNames>
				<!--<c1chart:DataSeries ConnectionFill="Blue" Label="Left" SymbolFill="White" SymbolMarker="DiagonalCross" SymbolStroke="Blue" Values="20 22 19 24 25 65 85 55 55 45" />-->
				<!--<c1chart:DataSeries ConnectionFill="Red" Label="Right" SymbolFill="White" SymbolStroke="Red" Values="8 12 10 12 15 45 45 55 35 35" />-->
				<!--<c1chart:DataSeries ChartType="LineSmoothed" ConnectionFill="Green" Label="Sample" SymbolFill="White" SymbolStroke="Red" Values="40 100 20 20 20 20 40 40 40 40" />-->
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="Red" 
									  Label="Right" SymbolMarker="Dot" SymbolFill="White" SymbolStroke="Red"
									  Values="10 15 10 15 15 45 45 45 35 35"
									  XValues=".250 .500 .750 1.0 1.5 2.0 3.0 4.0 6.0 8.0"/>
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="Blue" 
									  Label="Left" SymbolMarker="DiagonalCross" SymbolFill="White" SymbolStroke="Blue"
									  Values="40 40 NaN 50 55 65 65 85 65 55 45"
									  XValues=".125 .250 .500 .750 1.0 1.5 2.0 3.0 4.0 6.0 8.0"/>
									  <!--Values="0.25,20 0.5,35 0.75,30 1.0,35 1.5,35 2.0,45 3.0,45 4.0,55 6.0,35 8.0,35" />-->
									  <!--AxisX="0.250 0.500 0.750 1.0 1.5 2 3 4 6 8" AxisY="20 25 10 15 15 45 45 55 35 35" />-->
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="LightGray" 
									  Label="Left" SymbolMarker="None" ConnectionStrokeDashes=".8"
									  Values="-10 130"
									  XValues=".25 .25"/>
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="LightGray" 
									  Label="Left" SymbolMarker="None" ConnectionStrokeDashes=".8"
									  Values="-10 130"
									  XValues=".5 .5"/>
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="LightGray" 
									  Label="Left" SymbolMarker="None" ConnectionStrokeDashes=".8" ConnectionStrokeThickness="0.5"
									  Values="-10 130"
									  XValues=".750 .750"/>
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="LightGray" 
									  Label="Left" SymbolMarker="None" ConnectionStrokeDashes=".8"
									  Values="-10 130"
									  XValues="1 1"/>
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="LightGray" 
									  Label="Left" SymbolMarker="None" ConnectionStrokeDashes=".8" ConnectionStrokeThickness="0.5"
									  Values="-10 130"
									  XValues="1.5 1.5"/>
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="LightGray" 
									  Label="Left" SymbolMarker="None" ConnectionStrokeDashes=".8"
									  Values="-10 130"
									  XValues="2 2"/>
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="LightGray" 
									  Label="Left" SymbolMarker="None" ConnectionStrokeDashes=".8" ConnectionStrokeThickness="0.5"
									  Values="-10 130"
									  XValues="3 3"/>
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="LightGray" 
									  Label="Left" SymbolMarker="None" ConnectionStrokeDashes=".8"
									  Values="-10 130"
									  XValues="4 4"/>
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="LightGray" 
									  Label="Left" SymbolMarker="None" ConnectionStrokeDashes=".8" ConnectionStrokeThickness="0.5"
									  Values="-10 130"
									  XValues="6 6"/>
				<c1chart:XYDataSeries ChartType="Line" ConnectionFill="LightGray" 
									  Label="Left" SymbolMarker="None" ConnectionStrokeDashes=".8"
									  Values="-10 130"
									  XValues="8 8"/>
			</c1chart:ChartData>
		</c1chart:C1Chart.Data>
		<c1chart:C1ChartLegend DockPanel.Dock="Right" Visibility="Collapsed" />
		<!--<TextBlock Panel.ZIndex="5" Margin="35,160,0,0">250</TextBlock>
		<TextBlock Panel.ZIndex="5" Margin="65,160,0,0">500</TextBlock>-->
	</c1chart:C1Chart>
</Border>