Blogs

Bryan Wood - DevExpress Charts Blog

information and training regarding all things DevExpress Charting.
  • WPF and Silverlight Gauges–Digital Gauge Control (coming soon in v2011 vol 2)

         

    Is it time to update your current Silverlight or WPF app with a dashboard? Coming in DXperience 2011 volume 2 we are including one new type of gauge, the Digital Gauge control. The digital gauge control is useful for displaying text or numbers in a gauge that resembles a 7 segment, 14 segment or dot matrix (available in both 5 by 8 and  8 by 14) display. Digital gauges are great way to highlight changing or dynamic points data. Whether you are creating a dashboard or just want to draw attention to data in your application the Digital Gauge Control is what you need to enhance your application.

    With the new Digital Gauge control you have a lot of flexibility to create a wide array of characters. Additionally if you want to create custom symbols or characters there is also a mechanism in place to give you control to represent the characters you need.

    Like the Circular and Linear Gauges there are 11 built in models you can use to customize the look and feel of your Digital Gauge. You can enhance the visibility and utility of the Digital Gauge Control by enabling animation.

    The above video demonstrates the two available animation types (CreepingLineAnimation and BlinkingAnimation).

    What does the XAML Look Like?

    Digital-Gauge-Silverlight-WPF-Text

    As you can see you aren’t just limited to number, you can create sentences and using our custom symbol mapping you can draw just about anything else that can be drawn onto an LCD.

    <dxga:DigitalGaugeControl Text="Digital Gauge, Coming Soon..." Grid.Row="0" x:Name="gauge">
        <dxga:DigitalGaugeControl.Layers>
            <dxga:DigitalGaugeLayer>
                <dxga:DigitalGaugeLayer.Presentation>
                    <dxga:MagicLightDigitalGaugeBackgroundLayerPresentation>
                        <dxga:MagicLightDigitalGaugeBackgroundLayerPresentation.Fill>
                            <RadialGradientBrush Center="0.5,0" GradientOrigin="0.5,0" RadiusX="2.862" RadiusY="1">
                                <GradientStop Color="#FF182831" Offset="1" />
                                <GradientStop Color="#FF2B464B" Offset="0" />
                                <GradientStop Color="#FF111D20" Offset="0.35" />
                                <GradientStop Color="#FF080D10" Offset="0.3501" />
                            </RadialGradientBrush>
                        </dxga:MagicLightDigitalGaugeBackgroundLayerPresentation.Fill>
                    </dxga:MagicLightDigitalGaugeBackgroundLayerPresentation>
                </dxga:DigitalGaugeLayer.Presentation>
            </dxga:DigitalGaugeLayer>
        </dxga:DigitalGaugeControl.Layers>
        <dxga:DigitalGaugeControl.Model>
            <dxga:DigitalMagicLightModel />
        </dxga:DigitalGaugeControl.Model>
        <dxga:DigitalGaugeControl.SymbolView>
            <dxga:MatrixView8x14></dxga:MatrixView8x14>
        </dxga:DigitalGaugeControl.SymbolView>
    </dxga:DigitalGaugeControl>

    As you can see the code is very straightforward and notice that just as with our previous gauges you will be able to customize the look and feel beyond the default models if your app needs something with a more custom look. Additionally updating the displayed text is a simple matter of changing the text property on the root of the control.

    Conclusion

    The new Digital Gauge Control is only one of the many new features coming to you in DXperience 2011 volume 2. Stay tuned here to get the latest announcements and to learn how to better take advantage of your DevExpress Charting Suites. As always if you have any questions or comments please leave them below!

  • WPF and Silverlight Charts–Range Bar Charts (coming soon in v2011 vol. 2)

         

    We’re proud to announce the addition of Overlapped and Side-by-Side Range Bar chart types to our WPF and Silverlight Charting Suites. We’ve been hard at work to bring you the chart types you need to effectively display and take action on your data and I really think these two new chart types are going to be a very welcome addition.

    WPF-Silverlight-Range-Bar-Overlapping

    Why Range Bars?

    Some of you may ask, why do I want a Range Bar chart instead of the Range Area? That’s a great question and a lot of it comes down to what you intend to show in your chart. But let's step back a bit and take a look at what the Range Bar chart is good at and then we’ll look at when and why you may want to use them in your application.

    Like the Range Area chart, the Range Bar charts are all about comparisons. They help you to take multiple pieces of data and compare them in a way that will give you different ideas than the standard bar or area chart. One of the big differences between the Range Bar chart and a Range Area chart is that in addition to showing the Range of data with a bar, when you use multiple series you can also overlay the bars or place them side-by-side allowing you to not only visualize a range but also compare two series together very nicely.

    WPF-Silverlight-Range-Bar-Side-by-Side

    As this is a variation of a bar chart you have all of the normal customization that you’re familiar with like coloring, bar styles, custom models, and animation to name a few.

    As I mentioned in the beginning we’ll be releasing this is the DXperience 2011 volume 2 release which is coming soon. And please let me know what you think drop me an email or a comment below! Until next time…

  • WPF and Silverlight Charting - Multiple Panes (coming soon in v2011 vol 2)

         

    Are you building a financial chart with Silverlight? Do you need to see your volume bars along with your latest set of stock charts? Maybe you want to plot 4 different panes of data each with their own axis and scales. Coming in DXperience 2011 volume 2 you will be able to do that and more with our new support for Multiple Panes in both Silverlight and WPF. Let’s take a look and see what it looks like.

    Silverlight-WPF-multiple-panes-chart-bar-line-

    In the above image you are seeing 3 separate panes all sharing on common X axis. One of the really cool things about this is that it is all declarative. Meaning you define and assign the panes in XAML, the example below shows you exactly how this is done:

    <dxc:XYDiagram2D.PanesPanel>
        <ItemsPanelTemplate>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="2*"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="1.7*"/>
                </Grid.RowDefinitions>
            </Grid>
        </ItemsPanelTemplate>
    </dxc:XYDiagram2D.PanesPanel>
    <dxc:XYDiagram2D.DefaultPane>
        <dxc:Pane x:Name="temperaturePane" Grid.Row="0">
            <dxc:Pane.AxisXScrollBarOptions>
                <dxc:ScrollBarOptions Visible="False" />
            </dxc:Pane.AxisXScrollBarOptions>
        </dxc:Pane>
    </dxc:XYDiagram2D.DefaultPane>
    <dxc:XYDiagram2D.Panes>
        <dxc:Pane x:Name="pressurePane" Grid.Row="1">
            <dxc:Pane.AxisXScrollBarOptions>
                <dxc:ScrollBarOptions Visible="False" />
            </dxc:Pane.AxisXScrollBarOptions>
        </dxc:Pane>
        <dxc:Pane x:Name="humidityPane" Grid.Row="2"/>
    </dxc:XYDiagram2D.Panes>

    Something that is interesting about the code above is you can take advantage of the XAML you already know by defining the base layout using a Grid alternately you could also use a StackPanel, Canvas, or UniformGrid. Because we support the standard XAML layout controls this gives you a lot of leeway in defining the panel structure. In addition to the horizontal panes you see here you could easily set up panes vertically as well. Just because you have multiple panes doesn’t mean you are going to loose the ability to have multiple Axes, each pane will still be able to take advantage of both multiple X and Y Axes.

    Scrolling and Zooming is also fully supported by each individual pane. As the above code sample shows you can easily add, remove or modify the scroll bars for each individual pane by using the ScrollBarOptions.Visible = False|True. This also gives you the flexibility to use one scroll bar to scroll all panes (as in the above screen shot) or you can have a scroll bar for each pane.

    The last thing we need to think about is appearance and you can rest assured that the appearance is completely under your control as well since each pane also has properties that let you adjust the template, background, and scroll bar settings to name a few.

    Conclusion

    We have a lot of new features coming to you in DXperience 2011 volume 2. Stay tuned here to get the latest announcements and to learn how to better take advantage of your DevExpress Charting Suites. As always if you have any questions or comments please leave them below!

  • WPF and Silverlight Charts: Range Area Chart and Scatter Line Chart Types Coming in DXperience 2011 volume 2

         

    In DXperience 2011 volume 2 we are further expanding the available WPF and Silverlight Charts. We introduced Range Area charts to WinForms and ASP.NET in DXperience 2011 volume 1 and was very well received. For DXperience 2011 volume 2 we are proud to announce the Range Area Chart as well as the Scatter Line Chart to the WPF and Silverlight platforms. Lets take a look at the two new charts and explore some of the features and reasons why you need to look at these two charts.

    Range Area Chart

    Range-Area-Chart-WPF-Silverlight

    If you’re not familiar with Range Area Charts they are excellent at comparing two values where you’d like to accentuate the delta between the two series. As with our previous release of the Range Area chart you have many options for customization like: extensive label customization, coloring and transparency of the range area as well as the usual plethora of options regarding series points and lines. Additionally one of the benefits you’ll see when using the WPF and Silverlight versions is the built in dynamic animation options.

    Another example that demonstrates the power of the Range Area chart is this temperature chart that uses two Range Areas, one to show the historic extreme temperatures and another that shows the actual temperatures in Los Angeles for the month of August 2011.

    wpf-silverlight-los-angelest-august-weather-chart

    Scatter Line Chart

    Scatter-Line-Chart-WPF-Silverlight

    The scatter line chart is often used in scientific work where points need to be plotted against a grid. In terms of customization the Scatter Line Chart allows for all of the same customizations you’ve been using in your standard line charts (point and line customization). And also benefits from the WPF and Silverlight animation engine allowing you to give your charting a little something more to wow your end users. In the end we are enabling you to make a scientific chart that fits your data while still looking at home in your application.

    Conclusion

    DXperience 2011 volume 2 is going to be bringing a lot of new features for both the Charting and Gauge platforms, stay tuned as we will be delivering more details and we get closer to release date. As always I welcome any questions or comments you may have, so drop me a comment below!

  • Custom Gauges 101–Customizing the WPF and Silverlight Gauge Elements

         

    DX-Gauges-Auto-Tachometer

    With the recent release of DXperience 2011 vol.1 we’ve included the all-new DXGauge suite which allows you to create fantastic looking gauges in WPF and Silverlight. While the new Gauge Controls look good and have a great selection of templates you may find yourself wanting to modify or customize the gauges to match the look and feel of your application.

    Custom Presentation

    There are a few different ways to go about customizing your gauges. If you just want to adjust the existing items you can adjust the properties for various elements, allowing you to adjust color and shape as well as many other aspects. You also have the options to  completely adjust the look of the chosen model. Adjustment of the model is done through templates. All that you need to do is to create a new template and then inform the model to use the new template supplied by you. All of the elements in the gauge have a Presentation Section which allows you to set CustomPresentation and then apply a template. By applying a custom template we can tell the model to use our bit of custom graphics we’ve made in place of the default.

    For the purpose of this post I decided that I was going to make an Auto Tachometer. I started with the CircularProgressiveModel model and adjusted a few things like the text, the needle and a few other items. Just so you can have a point of reference, the default gauge looks like this:

    gauge-wpf-silverlight-default

    Its not a huge change from the image above, I just wanted to make something that would look appropriate as a car dashboard. You’ll see I’ve changed the text, added a gradient orange ring with a gradient red section in the 7-9k range. I’ve also changed the needle and the spindle cap as well.

    Customizing the Scale Label

    custom-label-gauge-suite-wpf-silverlight

    In the sample above I did some very simple modification of the Scale Label text by setting it to an amber color instead of the light blue shown above.. Normally the scale text color is bound to the model defaults in the case of CircularProgressive (my base model) the text is a light blue color. Since the color is defined by the model I used the ArcScale.LabelPresentation – LabelTemplate to set a custom model and adjust the color of our Scale Label. I could have adjusted this in any way I wanted, limited only by what I can design or program but in this case I kept it simple and changed the color and bound the text. Because XAML is a vector type of drawing all items can be scaled to any size without losing any quality, and to keep things simple when we draw the controls we base them on a 0 to 1 sizing for consistency, then they are scaled up to full size within your application. In the case of the Scale Label it is circular in shape and because of that we set the RenderTransformOrigin property to 0.5, 0.5 (remember we draw in a space where the max is 1, so 0.5, 0.5 is the middle of a 1 by 1 square) which centers the ControlTemplate in the gauge space.

    <ControlTemplate x:Key="scaleLabelTemplate">
        <TextBlock RenderTransformOrigin="0.5, 0.5" Foreground="#FFFF7E00" Text="{Binding Text}" />
    </ControlTemplate>
    .
    .
    .
    <dxga:CircularGaugeControl Height="300" Width="300">
        <dxga:CircularGaugeControl.Scales>
            <dxga:ArcScale EndAngle="-40" EndValue="9" MajorIntervalCount="9">
                <dxga:ArcScale.LabelPresentation>
                    <dxga:CustomScaleLabelPresentation LabelTemplate="{StaticResource scaleLabelTemplate}"/>
                </dxga:ArcScale.LabelPresentation>
            </dxga:ArcScale>
        </dxga:CircularGaugeControl.Scales>
    </dxga:CircularGaugeControl>

    Custom Needle

    wpf-silverlight-gauge-needle-custom

    One of the big differences between the customized label above and the needle is that the needle is a graphic object vs. the label which is a simple TextBlock. But like the label the needle format is by default determined by the chosen model. Keeping with the car theme I wanted to make a black needle that looked like it was backlit with amber. When customizing the gauges your custom graphic is going to fall into two different types, circular and linear. Now in this case I’m not talking about the gauge types, I’m referring to the shape of the custom graphic. For example the needle is a rectangle as is the spindle cap (even though it is a circle it is bound by a rectangle, more on that below). Circular graphics are used for the ranges and range areas, I’ll cover how to make those a little further down when we customize the range. Since we’re going to customize the needle we’ll need to make a new ControlTemplate and create something in a square or rectangular shape. In this ControlTemplate we set the RenderTransformOrigin to 0, 0.5 which aligns the needle to the left and middle of the design surface (from there it is stretched to fit in the needle space).

    <ControlTemplate x:Key="NeedleTemplate">
        <Grid RenderTransformOrigin="0,0.5">
            <Rectangle Height="10" >
                <Rectangle.Fill>
                    <RadialGradientBrush>
                        <GradientStop Color="#FFFF7E00" Offset="0.315"/>
                        <GradientStop Color="#00FF7E00" Offset="1"/>
                    </RadialGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <Rectangle Height="6" Fill="Black" StrokeThickness="0" Margin="2,0" />
        </Grid>
    </ControlTemplate>
    .
    .
    .
    <dxga:CircularGaugeControl Height="300" Width="300">
        <dxga:CircularGaugeControl.Scales>
            <dxga:ArcScale EndAngle="-40" EndValue="9" MajorIntervalCount="9">
                <dxga:ArcScale.Needles>
                    <dxga:ArcScaleNeedle >
                        <dxga:ArcScaleNeedle.Options>
                            <dxga:ArcScaleNeedleOptions EndOffset="30" StartOffset="-24" ZIndex="111"/>
                        </dxga:ArcScaleNeedle.Options>
                        <dxga:ArcScaleNeedle.Presentation>
                            <dxga:CustomArcScaleNeedlePresentation NeedleTemplate="{StaticResource NeedleTemplate}"/>
                        </dxga:ArcScaleNeedle.Presentation>
                    </dxga:ArcScaleNeedle>
                </dxga:ArcScale.Needles>
            </dxga:ArcScale>
        </dxga:CircularGaugeControl.Scales>
    </dxga:CircularGaugeControl>

    Above is the code for the needle, I’m not an expert on XAML graphics and I put this together in a matter of minutes so that I could have a simple example that showed how to make a custom needle.

    gauge-wpf-silverlight-custom-needle-base

    As you can see this is a simple rectangle within a rectangle and the outer rectangle has an orange radial gradient to give it a “glow” effect. It is important to note that no matter the size you make your needle it is relative to the gauge and since I made this short and blocky it will get stretched to fill the space from the spindle cap to the tick marks.

    Custom Spindle Cap

    WPF-Silverlight-Gauge-Circular-Spindle-Cap-Custom

    Like the Custom Needle we’re going to use a Control Template to give the Spindle Cap a new look and feel. Keeping with the amber backlit design we’re going to give the Spindle Cap a light amber glow to the edges so it will appear backlit. Also like the Custom Needle example we are going set the Presentation to custom and bind the template to our “spindleTemplate” to replace the default with our new template. The Spindle Cap again being circular uses the same 0.5, 0.5 offset for the RenderTransformOrigin property.

    <ControlTemplate x:Key="spindleTemplate">
        <Grid RenderTransformOrigin="0.5, 0.5">
            <Ellipse Height="14" Width="14" >
                <Ellipse.Fill>
                    <RadialGradientBrush>
                        <GradientStop Color="#FFFF7E00" Offset="0.677"/>
                        <GradientStop Offset="0.935"/>
                    </RadialGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
            <Ellipse Height="10" Width="10" Fill="Black" />
        </Grid>
    </ControlTemplate>
    .
    .
    .
    <dxga:CircularGaugeControl Height="300" Width="300">
        <dxga:CircularGaugeControl.Scales>
            <dxga:ArcScale EndAngle="-40" EndValue="9" MajorIntervalCount="9">
                <dxga:ArcScale.SpindleCapOptions>
                    <dxga:SpindleCapOptions FactorHeight="2" FactorWidth="2" ZIndex="1"/>
                </dxga:ArcScale.SpindleCapOptions>
                <dxga:ArcScale.SpindleCapPresentation>
                    <dxga:CustomSpindleCapPresentation SpindleCapTemplate="{StaticResource spindleTemplate}"/>
                </dxga:ArcScale.SpindleCapPresentation>
            </dxga:ArcScale>
        </dxga:CircularGaugeControl.Scales>
    </dxga:CircularGaugeControl>     

    Here again here is the raw image of the spindle cap generated by the XAML above. It is drawn with two simple ellipses (one with a gradient and one without).

    WPF-Silverlight-Gauge-Spindle-Cap-Raw

    Custom LinePresentation and Range

    WPF-and-Silverlight-ScaleRange-and-Line-Graphic

    I created the two effects on the rim of the gauge by two similar methods. Getting the amber line that goes up to the 7k line is pretty simple, as I mentioned earlier there is a Presentation section on all of the elements and instead of using the Custom setting for the Presentation section I use the Default setting and set a simple fill with a gradient.

    <dxga:ArcScale.LinePresentation>
        <dxga:DefaultArcScaleLinePresentation>
            <dxga:DefaultArcScaleLinePresentation.Fill>
                <RadialGradientBrush>
                    <GradientStop Color="#B5000000" Offset="0.878" />
                    <GradientStop Color="#FFFF7E00" Offset="1" />
                </RadialGradientBrush>
            </dxga:DefaultArcScaleLinePresentation.Fill>
        </dxga:DefaultArcScaleLinePresentation>
    </dxga:ArcScale.LinePresentation>

    The DefaultArcScaleLinePresentation section gives you the option to customize the line fill which we simply changed to a gradient from amber to black.

    Getting the Red section to start at the 7k and end at the 9k is a little more tricky, but not by much. I used a Range and set the StartValue to 7 and the EndValue to 9 and just like the LinePresentation section I use the Default setting instead of the Custom setting to set a simple fill.

    <dxga:ArcScale.Ranges>
        <dxga:ArcScaleRange EndValue="9" StartValue="7">
            <dxga:ArcScaleRange.Presentation>
                <dxga:DefaultArcScaleRangePresentation>
                    <dxga:DefaultArcScaleRangePresentation.Fill>
                        <RadialGradientBrush>
                            <GradientStop Color="Black" Offset="0.849" />
                            <GradientStop Color="#FFA01717" Offset="0.953" />
                        </RadialGradientBrush>
                    </dxga:DefaultArcScaleRangePresentation.Fill>
                </dxga:DefaultArcScaleRangePresentation>
            </dxga:ArcScaleRange.Presentation>
        </dxga:ArcScaleRange>
    </dxga:ArcScale.Ranges>

    Conclusion

    With the flexibility we’ve built into the Gauges control you can change the look and feel of the new Silverlight and WPF Gauges as little or as much as you can imagine. You can keep it simple by using some of the default properties available or you can tweak, stretch, change and replace pretty much anything to get the look you need for your app.

    I learned a LOT about XAML and customization when working on this post. I had a great time learning and designing something new. Are you working on some customizations? If so I’d love to see what you’re working on and as always please, if you have any questions, comments or anything else leave them in the comments below or you can reach out to me via email at: BryanW@DevExpress.com.

  • WPF and Silverlight Gauges–End User Interactivity

         

    Previously I announced the DXGauge Suite and if you’ve seen some of the recent charting webinars you’ve seen a little bit of what is possible with the new suite. One of the things that is really interesting is the flexibility of the WPF and Silverlight and how easily that flexibility translates to our gauge controls.

    In the example above gauges have been styled so that they look like knobs and using the interactivity options they behave as knobs as well allowing you to manipulate them to change the various parameters of the radio.

    Enabling Interactivity

    IsInteractive-Check-Window-WPF-Silverlight

    In the case of the radio we are using the IsInteractive property of the ArcScaleNeedle and Marker (the linear gauge representing the station frequency) on the individual gauges. The IsInteractive property is quite powerful, just by setting it to true you get the ability to drag and move the needle or optionally you can click on the scale and the needle will move to the point that was clicked. Now obviously, the radio is a bit more advanced. It takes advantage of the ValueChanged event on the ArcScaleNeedle object as well. Just like it sounds the ValueChange event fires any time the value of the needle is changed. When you combine the IsInteractive property and the ValueChanged event you unlock a lot of possiblities, one of them allowing you to manipulate and adjust a gauge as if it were a dial. Additionally you’ll notice that as the “TUNE” dial is adjusted the station marker moves to the left and right this is accomplished by using the built in two-way binding available in WPF and Silverlight.

    DX Gauge Suite basic

    Code

    <dxe:CheckEdit x:Name="chkEnableAnimation" Grid.Row="0" Content="Enable Animation" />
    <dxga:CircularGaugeControl Grid.Row="1">
        <dxga:CircularGaugeControl.Model>
            <dxga:CircularEcoModel />
        </dxga:CircularGaugeControl.Model>
        <dxga:CircularGaugeControl.Scales>
            <dxga:ArcScale>
                <dxga:ArcScale.RangeBars>
                    <dxga:ArcScaleRangeBar IsInteractive="True">
                        <dxga:ArcScaleRangeBar.Animation>
                            <dxga:IndicatorAnimation Enable="{Binding ElementName=chkEnableAnimation, Path=IsChecked}" />
                        </dxga:ArcScaleRangeBar.Animation>
                    </dxga:ArcScaleRangeBar>
                </dxga:ArcScale.RangeBars>
                <dxga:ArcScale.Markers>
                    <dxga:ArcScaleMarker IsInteractive="True">
                        <dxga:ArcScaleMarker.Animation>
                            <dxga:IndicatorAnimation Enable="{Binding ElementName=chkEnableAnimation, Path=IsChecked}" />
                        </dxga:ArcScaleMarker.Animation>
                    </dxga:ArcScaleMarker>
                </dxga:ArcScale.Markers>
                <dxga:ArcScale.Needles>
                    <dxga:ArcScaleNeedle IsInteractive="True">
                        <dxga:ArcScaleNeedle.Animation>
                            <dxga:IndicatorAnimation Enable="{Binding ElementName=chkEnableAnimation, Path=IsChecked}" />
                        </dxga:ArcScaleNeedle.Animation>
                    </dxga:ArcScaleNeedle>
                </dxga:ArcScale.Needles>
            </dxga:ArcScale>
        </dxga:CircularGaugeControl.Scales>
    </dxga:CircularGaugeControl>

    As you can see the code for creating a gauge with a needle, marker and a range bar along with enabling animation and interactivity is quite simple.

    This is just one aspect of the upcoming DXGauge Suite and it is definitely a powerful one. I’ll be discussing more of the possibilities with the new DXGauge Suite soon, so keep posted and let me know what interests you.

    Conclusion

    Interactivity is an easy to use yet very powerful component in the Gauge Suite and will be available for both WPF and Silverlight. This and many other new features are coming to DXperience 2011 volume 1 so look for them on our blogs and in the upcoming release.

    And as always if you have any questions or comments please leave them below!

  • ASP.NET and WinForms Charting - Series and Axis Label Enhancements

         

    Overlapping-Axis-Labels

    Are your labels crowded? Sometimes the reality is that you have more label than you have room for. Coming in DXperience 2011 volume 1 is a new way to deal with long axis and series labels. Currently if you have a long axis label you have a couple of options. Probably the easiest and most effective would be to change the data, just shorten the names. While this sounds good, in practice or in most business apps I’ve worked on changing the data is not an options. Also if you are tied to a Pivot Grid at may not be an option at all.

    A second option would be to rotate the axis label so that width wouldn’t cause you overlap.

    Axis-Label-Vertical

    For a majority of scenarios this is an acceptable way to avoid overlapping labels. Depending on your layout this may not be a viable option.

    Another option would be to stagger your axis labels.

    Axis-Labels-Staggered

    This is another option that will work in a lot of scenarios but may not work on all of them.

    Let’s look at our new options…

    New Option

    In DXperience 2011 volume 1 we are introducing two new properties on the Axis and Series Labels. The first property is MaxWidth which allows you to set the maximum label width (in pixels), the side effect of having a fixed width is that anything longer than the specified width is wrapped to a new line. The second property is MaxLineCount, which allows you to define the maximum number of lines to allow when wrapping text (0 being unlimited).

    Property-Window-ASP.NET-Labels-Enhancement

    Lets look at how we can use these new properties. If we just adjust the MaxWidth and set it to 70.

    WinForms-and-ASP.NET-Label-ENhancements

    Awesome, now we have a way to tame long labels without changing the orientation or staggering. As you can see this makes for a very readable set of axis labels.

    Now let’s look at the second property MaxLineCount as I mentioned earlier this limits the number of lines we allow the label to wrap to. In the example below I’ve set the MaxLineCount to 1, meaning that we aren’t going to allow for any line wraps.

    Series-and-Axis-Label-Enhancement-Ellipses

    You’ll notice that the text that goes beyond the specified width is truncated and an ellipsis is added. These two options in addition to the already existing label options give you an immense amount of control over how you choose to display your labels.

    We do sacrifice immediate readability in the truncated chart. A simple way to enhance readability without impacting the layout of the chart would be to use Hit Testing to show the full text when the mouse is hovered over an individual axis label. 

    While all of my above samples are using axis labels, these new properties are also give you the ability to have multi-line series labels as well.

    Conclusion

    As an added benefit these new properties also give you a way to dynamically handle the axis labels when resizing a chart, simply adjust the Max Width and Max Line Count parameters based on the width/height of the chart.

    This and other exciting new features are found in DXperience 2011 volume 1 coming soon!

    Tell me what you think of this feature in the comments below!

  • WPF and Silverlight Charting–Scrolling and Zooming

         

    wpfslScrollingAndZoomoing

    Scrolling and Zooming is coming to WPF and Silverlight in DXperience 2011 vol 1. This is one of the most anticipated features for DXCharts and I am personally very excited to see this coming to the platform. You will get selective scrolling (X, Y or both) as well as zooming.

    As you can see above one of the useful features is the ability to drag and resize either side of the scroll bar to adjust the zoom level. Additionally you can use the mouse scroll wheel or the keyboard to adjust the zoom level as well. You also have the ability to adjust the scroll bar locations to either the left or right hand for the Y axis or the top or bottom for the X axis. You also have the ability to disable the scroll bars while retaining the the ability to scroll and zoom.

    Also let’s take a second and talk about performance. The above video has 3k points per series giving us 9k points. We aren’t doing any tricks to pre-process the points before we give them to the chart, the chart is handling these real time and the scrolling and zooming just works beautifully.

    Lastly, for anyone who isn’t already familiar our WPF and Silverlight Charting products have a shared codebase. So once you take the few minutes learn how to enable scrolling and zooming on WPF you don’t have to learn it again Silverlight, it’s the same.

    Conclusion

    There are a lot of new features being packed into DXperience 2011 vol 1, scrolling and zooming for WPF and Silverlight is definitely one of the highlights and as I mentioned before I am very excited  for this to release as it is very useful. As always if you have any questions or comments please drop them below.

  • WinForms Charting–New Skinning Support

         

    In DXperience 2011 volume 1 the Winforms charting controls are getting new skinning support. Now when you take advantage of our great looking skins that are available you’ll also get the same styling with your charts. You’ll notice in the above clip that when the style of the demo is changed from the standard skin to the DevExpress Dark Style  the chart changes as well. The level of change is more than just the background and a title here and there. The whole chart gets updated, this includes the Titling, diagram, grids, tick marks, banding, EVERYTHING! This is very exciting, if you were to design your own skin your charts would get the same look and feel and be a perfect fit within your application.

    New Default Style

    All of this is made possible through the addition of a new Style titled “Default”.  The style of the chart when you drop it on a form is “Default” this allows the chart to pick up all of the various style elements from the skin. If you wanted to disable the built in skinning or have a different style, all you need to do is change the style to something other than “Default” or manually set the look and feel of the various chart elements.

    Conclusion

    As you can see this provides a level of integration that before you would have had to do by hand, now having your chart fit within your choice of skins is seamless and effortless. Look for this soon, coming in DXperience 2011 volume 1!

    As always I would love to hear any feedback you may have so please drop me a comment below.

  • Last Chance–Register for the Exploring ASP.NET Charting Client Side Development Webinar– Less Than An Hour Away

         

    image

    Wednesday May 4th, 2011 01:00pm EDT | 10:00am PDT | 06:00pm GMT

    Who should attend:

    If you have questions about DevExpress charting or you just want to see some of our upcoming cool features. Come take a look!

    Presenters

    mypic
    Bryan Wood
    Technical Evangelist – Charting Team

    Amanda Christensen
    Amanda Christensen
    Host

    Register Now

    What are you waiting for? Go register, now.

  • WPF and Silverlight Gauge Controls

         

    DXGauges

    DXGauges is the name for our soon-to-be released gauge components for Silverlight and WPF. The first version will come complete with multiple models to adjust the look and feel as well as custom Ranges, Range Bars, Markers, Needles and Spindles (for Circular gauges) and a whole lot of other things you can adjust and modify to fit within your application. You’ll also see some great animation and interactivity that will not only let your customers visualize their data in new ways but they will also have a new way to interact with their data. In the rest of this post we are going to look at the two types of gauges we’re bringing you and introduce you to some of the different models and give you a chance to see just how flexible they are.

    Anatomy of a Gauge: Circular

    WPF-Silverlight-Circular-Gauge[5]

    As you can see the Circular Gauge is made of a few basic elements the Frame, Needle, and a Range are the most basic components. The above example also shows the use of a Range Bar a couple different Ranges a Marker and a spindle. Additionally you could change the background of the gauge itself by adding layers. All of these elements are highly configurable allowing you a great amount of design flexibility so that you can create a gauge that fits your needs.

    Anatomy of a Gauge: Linear

    WPF-Silverlight-Linear-Gauge

    This is the Linear Gauge it shares some basic components with the Circular Gauge but it allows you to visualize things in a different way. It still has all of the flexibility that you’ll find in the Circular Gauges.

    Predefined Models

    While you definitely have a lot of options for customization we’ve take a lot of the work out of it for you by providing a set of models that cover a wide area in terms of design.

    Animations

    DXGauges Animations

    Just by setting a single Boolean value you can enable fantastic animation that just works, right out of the box you’ll be able take advantage of animations that will give you gauges a fluid, professional look that is sure to be noticed. In the graphic above the only things changing are the values, the animation from point to point is handled by the control allowing you focus on more important things than learning how to write an animation engine.

    Interactivity

    DXGauges Interactivity

    Another great out of the box feature is interactivity. In the above sample I am clicking on the range and all of the items are moving to the point. This is usable with Two-Way binding so that your can enable your users to adjust values in an easy and intuitive manor. Additionally you can drag the individual elements or just click where you want them to go and they will nicely animate to their new position.

    Conclusion

    As I’ve said before we are bringing a lot of new and exciting things to DXperience 2011 volume 1 and this is an excellent example showing the hard work our team has been putting in to bring you great data visualization controls.

    I’d love to hear your thoughts on our new Gauges, please drop me a comment below and let me know what you think!

  • WPF and Silverlight Charting: 4 New Chart Types

         
    In DXperience 2011 Volume 1 we are bringing you 4 new chart types for WPF and Silverlight. All four of these new chart types support customization of colors, markers, line sizes and all of the other customizations that make our product so flexible. These new chart types expand the ways you can visualize your data and deliver more value to your customers. Below you can see what each of the new chart types look like as well as get an idea where you might be able to use them.

    2D Stacked Line

    2D-Stacked-Line-WPF-Silverlight

    The Stacked line Chart is a great chart for showing the trend of multiple series over time or category. Here are looking at the dollar amount of the Gross State Product for five different US States. For stacked lines you can think of them like a linear pie chart. You are seeing how each line is part of the whole. The primary difference between this chart (Stacked Line) vs. the Full-Stacked Line is that this chart shows the base values where a Full-Stacked Line Chart will show the values as a percent.

    2D Full-Stacked Line

    2D-Full-Stacked-Line-WPF-Silverlight

    Like the Stacked Line Chart the Full-Stacked Line Chart is good at showing the trend of multiple series over time/category. Additionally what the Full-Stacked Line Chart shows the percentage comparison of the individual series to the whole.

    2D Step Line

    2D-Step-Line-WPF-Silverlight

    The Step Line chart is similar to a line chart in that it allows you to see the rate of change across a given time frame or set of categories. Though it differs in that the “steps” draw attention to the changes in data versus being smoothed out or obscured with a line. This chart very clearly shows the change in US oil prices at a glance because there is no smoothing happening, every change is a sharp and distinct movement on the chart.

    2D Step Area

    2D-Step-Area-WPF-Silverlight[5]

    Like the above Step Line chart the Step area chart is similar to a line chart in that it allows you to see the rate of change across a given time frame or set of categories. Also because it is an area it allows you to clearly see the boundaries and at a glance identify all of the data contained within a highlighted range. To me this chart is almost a hybrid of a bar and a line. You get some of the benefits of a bar: a clear distinction of every value with the “bar” areas colored in. And then you get some of the benefits of a line: a clear line showing defining an edge as well as markers drawing attention to the argument columns.

    Conclusion

    As you can see WPF and Silverlight are getting some great new chart types that will empower your users to make better decisions based of a clearer view of your data.

    Stay tuned to learn more about the exciting additions to charting coming in DXperience 2011 vol. 1

    Any comments or questions drop them below!

  • WinForms Charting: Movable Legend using Image Annotations

         

    Want a legend that your users can drag to position anywhere on the form? Exploring one of the more advanced usages of Annotations we’ll extend them by making them into a Legend.

    Annotations

    The standard use of an annotation is to call out to a particlar piece of data or to highlight a portion of the chart. You can create both text annotations as well as image annotations, giving you a lot of flexibility in the look or feel. Additionally in WinForms the annotations have options to enable dragging and resizing. Today we are going to make use of image annotations as well as the RuntimeMoving property.

    MovableLegend2

    As you can see above what we have is something that looks like a legend but has the flexibility of an annotation.

    Simple Code

    The idea behind this is pretty simple. First we clone our existing chart. Next we move the legend to the outside top left. Lastly we convert the legend into an image and put it inside of an annotation. Lets look at the code to make this work.

    Bitmap legendBitmap = new Bitmap(100, 50);
    using (ChartControl fakeChart = (ChartControl)chartControl1.Clone()) {
        fakeChart.Legend.Visible = true;
        fakeChart.BorderOptions.Visible = false;
        fakeChart.Padding.All = 0;
    
        fakeChart.Legend.Border.Visible = false;
        fakeChart.Legend.Margins.All = 0;
        fakeChart.Legend.Padding.All = 0;
        fakeChart.Legend.BackColor = Color.Transparent;
        fakeChart.Legend.AlignmentHorizontal = LegendAlignmentHorizontal.LeftOutside;
        fakeChart.Legend.AlignmentVertical = LegendAlignmentVertical.TopOutside;
        
        ((XYDiagram)fakeChart.Diagram).DefaultPane.Visible = false;
    
        fakeChart.DrawToBitmap(legendBitmap, new Rectangle(Point.Empty, legendBitmap.Size));
    }

    The above code is the first part of the equasion, the second line clones the existing chart and remainder is responsible for moving the the legend to the outside of the chart and configuring it so that when we grab a plain image of the legend. The second to last line makes the DefaultPane not visible so the only thing left will be the legend. The last line coverts what is left of the chart (the legend) to an image and stores it in legendBitmap.

    Note: this is only using two series and we're setting the size of the image manually. To see how you can calculate the size of the legend see this this code central example: E2366

    chartControl1.Annotations.Clear();
    chartControl1.Annotations.AddImageAnnotation("Legend", legendBitmap);
    chartControl1.Annotations[0].RuntimeMoving = true;
    chartControl1.Annotations[0].Border.Thickness = 2;
    chartControl1.Annotations[0].Border.Color = Color.Gray;
    chartControl1.Annotations[0].ConnectorStyle = AnnotationConnectorStyle.None;

    This last piece of code creates the image annotation and adds to it our newly created bitmap. The next line sets RuntimeMoving to true which allows the annotation to be draggable at runtime.

    Conclusion

    That’s all that is required to make a movable legend. If you are interested you can download this project (here). Also if you’d like to learn more about annotations you’ll find more info here: http://documentation.devexpress.com/#XtraCharts/CustomDocument7858

    Lastly, please drop me a comment and let me know what you do with this!

  • Register for the Ask the DevExpress Charting Team April 14th 2011

         

    Webinar-Reg-Ask-The-Team

    Wednesday April 14th, 2011 01:00pm EDT | 10:00am PDT | 06:00pm GMT

    Who should attend:

    If you have questions about DevExpress charting or you just want to see some of our upcoming cool features. Come take a look!

    Presenters

    mypic
    Bryan Wood
    Technical Evangelist – Charting Team

    Amanda Christensen
    Amanda Christensen
    Host

    Register Now

    What are you waiting for? Go register, now.

  • ASP.NET and WinForms Charting–New Chart! Range Area for 2D and 3D

         

    The Range Area chart has been one of our most highly requested chart views. We heard you loud and clear and we are very proud to say that will be bringing the range chart to you in DXperience 2011 vol 1. It will be coming in the form of two new views Range Area 2D and Range Area 3D. Initially the Range Area chart will be making its way first on to the ASP.NET and WinForms platforms. Read on to learn why you may want to use a range chart or to see what kind of customizations are going to be available.

    What is the Range Area Good for?

    The Range Area chart is great at comparing two series over time (or over categories) to quickly see the delta and rate of change.

    Customizable?

    Range-Area-2d

    Is it customizable? Absolutely, you still have the ability to adjust things like marker size and shape, colors, and labels. The Range Area is a unique chart because it has two lines (two values per argument) and an area. Because of these extra elements this allows for a lot more options with settings as well as some settings that are new to our charting platform. One of the scenarios on a Range Area is the ability for the lines to cross, due to this subtle detail we’ve made the line and marker colors, style and all other features individually configurable. This gives clarity, for example: allowing you to understand if the bottom series moved above the top line or just touched it. Additionally you have options in regards to the labels. You have the ability to show labels for the Value1 (all of the labels from the magenta line), Value2 (all of the values from the green line), min (only the labels on the bottom  regardless of the series value), max (only the labels on the top regardless of series value), Two Labels (both the top and bottom value labels as pictured above) and lastly the One Label (the delta between the two series).

    What About 3D?

    Range-Area-Chart-3D

    3D be included giving you the tools to give your end users the data visualizations that they require.

    Conclusion

    If the range chart is something you’re interested in you aren’t going to have to wait much longer. As I mentioned in the beginning  it will be coming for both ASP.NET and WinForms in both 2D and 3D in DXperience 2011 vol 1 release. If you have any comments or questions please drop a comment below.

Next page »
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.