Jump to content
Software FX Community

Gallery types supported in Chart FX for WPF


Recommended Posts

In Chart FX for WPF we try to support the most common gallery types in our core DLL (ChartFX.WPF.dll) but at the same time we want to be very agile supporting additional gallery types, we do this in separate satellite assemblies which allows us to keep our library at a reasonable size but still allowing users to easily create other not-so-common gallery types.

If you check the Gallery enumeration which is the list of gallery types we support in our core dll, you will find the following galleries:

[color= blue]public enum [/color][color= #2b91af]Gallery[/color]{    Bar,    Area,    Line,    Curve,    Pie,    Scatter,    Bubble,    Radar,    Polar,    Doughnut,    Gantt,    OpenHighLowClose,    Candlestick,    HighLowClose,    TreeMap,    CurveArea,    Step,    Pyramid,    Cube,    Funnel,    Surface,}

Note that we use gallery type in a strict sense, so we are not counting here any variations such as stacked/stacked100, 2D/3D, etc, the galleries will try to honor as many of these common properties as possible. Also note that each gallery in the enumeration is backed up by a class and sometimes these classes will expose additional properties, for example when you create a Radar chart you will get lines connecting the points but you can also paint the area as follows

  [color= blue]<[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.AllSeries[/color][color= blue]>    <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes[/color][color= blue]>      <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes.GalleryAttributes[/color][color= blue]>        <[/color][color= #a31515]cfxGalleries[/color][color= blue]:[/color][color= #a31515]Radar [/color][color= red]Gallery[/color][color= blue]="Area"/>      </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes.GalleryAttributes[/color][color= blue]>    </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes[/color][color= blue]>  </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.AllSeries[/color][color= blue]>[/color]

Posted Image

Other classes also add interesting functionality, the Bar class allows bar charts to use X values, the Pie class allows you to create 3D pie charts where the height of each slice depends on another variable, etc. You can also set the GalleryAttributes property on a per-series basis, which allows you to use different settings for different series in your chart.

In addition to this set of built-in galleries we have developed the following assemblies that support extra gallery types

  • Rose: Sometimes also called wind chart
  • HighLow: Displays 2 series filling the area between the 2 where the color depends on which series is bigger
  • Bullet: Used in dashboards to compare performance against comparative measures.
  • XYZ: Includes support for XYZ surface as well as XYZ scatter plots
  • WinLoss: Used for Win/Loss records and also show values that meet a specific condition.

Using these extra gallery types is straightforward, the manual way would be to add a reference to the DLL in your project, then setting (in XAML or code) the SeriesAttributes.GalleryAttributes property to point to the class that implements the new gallery type. Our design time wizard can automate these steps if you use the gallery option

Posted Image 

Please note that in both Visual Studio 2008 and 2010 our wizard will automatically add the required references to your project but in Blend 3 this is not supported so you have to manually add the reference before running the wizard. We will not show external galleries (or chart styles) if the reference is not present.

 

JuanC

Link to post
Share on other sites
×
×
  • Create New...