Click here to Skip to main content
15,898,036 members
Articles / Operating Systems / Windows

WPF Chart Control With Pan, Zoom and More

Rate me:
Please Sign up or sign in to vote.
4.92/5 (42 votes)
10 Dec 2012Public Domain10 min read 388.1K   10.9K   174  
Chart Control for Microsoft .NET 3.0/WPF with pan, zoom, and offline rendering to the clipboard for custom sizes.
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{455B0C11-236A-4A4E-956F-1A3E41B7260B}</ProjectGuid>
    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <RootNamespace>Swordfish.WPF.Charts</RootNamespace>
    <AssemblyName>Swordfish.WPF.Charts</AssemblyName>
    <WarningLevel>4</WarningLevel>
    <OutputType>library</OutputType>
    <ApplicationVersion>1.0.0.*</ApplicationVersion>
    <!-- Most people will use Publish dialog in Visual Studio to increment this -->
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>.\bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugSymbols>false</DebugSymbols>
    <Optimize>true</Optimize>
    <OutputPath>.\bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugType>full</DebugType>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="PresentationCore" />
    <Reference Include="PresentationFramework" />
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Printing" />
    <Reference Include="System.ServiceModel" />
    <Reference Include="System.Runtime.Serialization" />
    <Reference Include="System.IdentityModel" />
    <Reference Include="UIAutomationProvider" />
    <Reference Include="WindowsBase" />
    <Page Include="XYLineChart.xaml" />
    <Compile Include="XYLineChart.xaml.cs">
      <DependentUpon>XYLineChart.xaml</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="AdornerCursorCoordinateDrawer.cs" />
    <Compile Include="ChartPrimitive.cs" />
    <Compile Include="ChartUtilities.cs" />
    <Compile Include="ClosestPointPicker.cs" />
    <Compile Include="ColorLabel.xaml.cs">
      <DependentUpon>ColorLabel.xaml</DependentUpon>
    </Compile>
    <Compile Include="CopyToClipboard.xaml.cs">
      <DependentUpon>CopyToClipboard.xaml</DependentUpon>
    </Compile>
    <Compile Include="LineAndPloygon.cs" />
    <Compile Include="MouseCursorCoordinateDrawer.cs" />
    <Compile Include="PanZoomCalculator.cs" />
    <Compile Include="ResultsPlottingUtilities.cs" />
    <Compile Include="TestPage.xaml.cs">
      <SubType>Code</SubType>
      <DependentUpon>TestPage.xaml</DependentUpon>
    </Compile>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <SubType>Designer</SubType>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    </EmbeddedResource>
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
      <DependentUpon>Settings.settings</DependentUpon>
    </Compile>
    <Compile Include="UniformWrapPanel.cs" />
    <Compile Include="WPFCursorFromBitmap.cs" />
    <AppDesigner Include="Properties\" />
  </ItemGroup>
  <ItemGroup>
    <Page Include="ColorLabel.xaml" />
    <Page Include="CopyToClipboard.xaml" />
    <Page Include="TestPage.xaml" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" />
  <ProjectExtensions>
    <InteractiveDesigner>
      <ProjectExtensions>
        <Version>0.03</Version>
      </ProjectExtensions>
    </InteractiveDesigner>
    <VisualStudio />
  </ProjectExtensions>
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication


Written By
Founder Cheesy Design
Taiwan Taiwan
John graduated from the University of South Australia in 1997 with a Bachelor of Electronic Engineering Degree, and since then he has worked on hardware and software in many fields including Aerospace, Defence, and Medical giving him over 10 of years experience in C++ and C# programming. In 2009 John Started his own contracting company doing business between Taiwan and Australia.

Comments and Discussions