Visifire Silverlight and WPF Charts v3.5.7 beta Released!

somnath

Hi,

This release contains the following enhancement:

  • New Chart types Spline and Radar have been implemented in Visifire.

Also, this release contains fix for the following bugs:

  • Int64 overflow issue with DataPoint having bigger YValue.
  • AxisIndicator was getting clipped if chart size was less.
  • Chart threw exception while updating the DataSeries which was removed from the Series collection of Chart.

Visifire v3.1.4 beta for Silverlight 3 has also been released with the above features.

You can download Visifire v3.1.4 beta & v3.5.7 beta here.

Cheers,
Team Visifire


Realtime Update Using DataBinding

somnath

DataBinding provides a simple way to manipulate and interact with data. DataBinding does the clear separation between UI implementation and business logic layer. The data can be imported from any data source like database, file etc. The UI element can be any framework element like DataGrid, Chart etc to visualize the data. Connection between UI and data object results in flow of data between them. When DataBinding is done, if the data changes then UI element which is bound to the data object also changes. In the case of two ways binding, changes made to UI element will cause data object to change.

In this post I will discuss about “How DataBinding takes place at real-time”. I prefer updating the chart at real-time without manipulating the Visifire chart elements directly. I will be doing multiple operations like add, delete, update with a collection and it’s good to see the changes reflecting in the chart at real-time.

Get Microsoft Silverlight

The figure shown below explains the conceptual representation of DataBinding between Visifire Chart and an ObservableCollection. DataRow is a class which holds Data for a DataPoint. A DataRow defines one or more number of properties to be mapped with DataPoints according to the data-mapping-rules defined at Series level. DataRows is a collection of one or more DataRow. Every record present in the DataRows collection represents a DataPoint.
Visifire-Chart-Realtime-Update-Using-DataBinding.xap
DataMapping rules which are to be specified in DataSeries are shown below:
<vc:DataSeries RenderAs="Column" LabelEnabled="True" Margin="-1,0,1,0">
    <vc:DataSeries.DataMappings>
        <vc:DataMapping MemberName="AxisXLabel" Path="AxisXLabel"></vc:DataMapping>
        <vc:DataMapping MemberName="YValue" Path="YValue">
    </vc:DataSeries.DataMappings>
 </vc:DataSeries>

In this example we are going to use dataRows as DataSource. Here DataSource property of the DataSeries has been set from managed code.

MyChart.Series[0].DataSource  = dataRows;

Please note that I  have used a DataGrid to dispaly the data present in dataRows in a tabular format. So I have bound dataRows collection with the DataGrid also. As DataGrid is bound with the collection, one can update the data present in collection just by editing the DataGrid cells. We can even directly perform Add, Remove operations with dataRows collection which will reflect in Chart as well as DataGrid.

DataRow is the class which has two properties named  AxisXLabel and YValue. This class contains business logic which is required to interact with values of dataRows. You may wonder how does it know when the property value changes? The answer to this question lies in the interface called INotifyPropertyChanged which is in System.ComponentModel namespace. The DataRow class implements INotifyPropertyChanged which notifies when the business object changes. So, whenever the value changes in the DataSource, corresponding property will trigger PropertyChanged event.

using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace VisifireDataBinding
{ 

  public class DataRow : INotifyPropertyChanged
  {
    /// <summary>
    /// Selected property is used to know whether the DataRow is selected  or not
    /// </summary>
    public Boolean Selected
    {
       get
       {
          return _select;
       }
       set
       {
         _select = value;

        if (PropertyChanged != null)
            PropertyChanged(this, new PropertyChangedEventArgs("Select"));
        }
    }

    /// <summary>
    /// AxisXLabel property
    /// </summary>
    public String AxisXLabel
    {
        get
        {
            return _axisXLabel;
        }
        set
        {
           _axisXLabel = value;

           if (PropertyChanged != null)
               PropertyChanged(this, new PropertyChangedEventArgs("AxisXLabel"));
         }
     }

     /// <summary>
     /// YValue property
     /// </summary>
     public Double YValue
     {
         get
         {
             return _yValue;
         }
         set
         {
            _yValue = value;

            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs("YValue"));
         }
      }

      #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

      #endregion

      Double _yValue;
      String _axisXLabel;
      Boolean _select;
   }
}

You can find additional information about InotificationPropertyChanged here.

As a result, chart is displayed with chart contents as shown below.

DataBinding makes it easy to display “live” data.

Changes made in the DataSource also causes changes in the chart without requiring any coding on your part! Now manipulate the values in DataGrid which may include addition, removal, update of DataPoint properties.

The DataGrid after adding properties for one or more DataPoint will look like below.

The Output changes!

Above image shows the chart with newly added AxisXLabel and YValue at real-time. Notice as I change values in DataGrid, the chart gets updated automatically.

You can download the source code of the sample demo application here.

Cheers,
Team Visifire


Visifire Silverlight and WPF Charts v3.5.6 Released!

somnath

Hi,

This release contains the following enhancement:

  • AnimationEnabled property has been introduced in ChartGrid class. One can easily enable or disable the initial animation for Grids.

Also, this release contains fix for the following bugs:

  • ViewportRangeEnabled property for secondary y-axis was not behaving as expected.
  • Color property threw exception while DataMapping.
  • Axis was not updated if a DataPoint was removed at real-time.

Visifire v3.1.3 for Silverlight 3 has also been released with the above features.

You can download Visifire v3.1.3 & v3.5.6 here.

Cheers,
Team Visifire


Visifire Silverlight and WPF Charts v3.5.5 Released!

somnath

Hi,

This release contains the following enhancements:

  • ActualInterval property has been introduced in Axis. So one can easily access the actual interval calculated internally.
  • The performance has been improved by optimizing TextParser and DataPoint selection logic.
  • Modifier “#Percentage” is now applicable for all chart types. You can see the live demo below. Also visit Visifire documentation for more info.

Get Microsoft Silverlight

Here is the source code for the above sample.

Also, this release contains fix for the following bugs:

  • In WPF, chart threw exception while resizing in Blend.
  • Chart threw exception if InterlacedColor property of ChartGrid was updated at real-time.
  • Stacked Area chart was not behaving as expected if YValue property was not set in DataPoint.
  • Indicator for Chart was not working properly with Safari on Mac.
  • TrendLine was not behaving as expected if XValueType property was set as ‘Time’ in DataSeries.

Visifire v3.1.2 for Silverlight 3 has also been released with the above features.

You can download Visifire v3.1.2 & v3.5.5 here.

Cheers,
Team Visifire


Visifire Silverlight and WPF Charts v3.5.4 GA Released!

somnath

Hi,

Today we are releasing Visifire 3.5.4 GA with the following features:

Also this release contains fix for the following bugs:

  • Selected property in DataPoint was not returning proper value on mouse click event.
  • Label for vertical TrendLines were not displayed properly.
  • Logarithmic axis was not working as expected for chart without any DataSeries.
  • NewLine character was not working as expected in AxisXLabel property of DataPoint.

Visifire v3.1.1 for Silverlight 3 has also been released with the above described features.

You can download Visifire v3.1.1 & v3.5.4 here.

Cheers,
Team Visifire


Visifire Silverlight and WPF Charts v3.5.4 beta 2 Released!

somnath

Hi,

This release contains the following enhancements:

  • ShowIndicator() and HideIndicator() function has been implemented in Chart. So now user will be able to show or hide Indicator for Chat on PlotArea mouse event of another chart.

Here is the live demo

Get Microsoft Silverlight

Visifire v3.1.1 beta 2 for Silverlight 3 has also been released with the above described features.

You can download Visifire v3.1.1 beta 2 & v3.5.4 beta 2 here.

Cheers,
Team Visifire


Visifire Silverlight and WPF Charts v3.5.4 beta Released!

somnath

Hi,

Today we are releasing two most awaited features i.e, Logarithmic axis and auto update of y-axis while Scrolling and Zooming.

  • Logarithmic Axis:  Two new properties Logarithmic and  LogarithmBase have been introduced in Axis. Both properties are applicable for y-axis only.
  • Auto update of y-axis labels: New property ViewportRangeEnabled has been introduced in Axis. It is applicable for y-axis only. Please visit Visifire documentation for more information.

Here is the live demo

Get Microsoft Silverlight

Also this release contains fix for the following bugs:

  • Chart threw exception while resizing if Title was set in Axis.
  • Chart threw exception if the DataContext of chart was set to null while property binding.

Visifire v3.1.1 beta for Silverlight 3 has also been released with the above described features and bug fixes.

You can download Visifire v3.1.1 beta & v3.5.4 beta here.

Cheers,
Team Visifire


Visifire Silverlight and WPF Charts v3.5.3 Released!

somnath

Hi,

This release contains the following enhancements:

  • Mouse events for TrendLine have been implemented. You can go through Visifire documentation for more info.
  • Grid-lines over vertical plank has been implemented.
  • Auto AxisLabels placement for AxisX in Bar chart has been implemented.

Also this release contains fix for the following bugs:

  • Legend marker color was not getting updated if ColorSet was set at real-time in DataSeries.
  • TextWrap property was not working as expected in AxisLabels.
  • DataBinding was not working as expected if Nullable properties were mapped while DataMapping.

Visifire v3.1.0 for Silverlight 3 has also been released with the above described features and bug fixes.

You can download Visifire v3.5.3 & v3.1.0  here.

Cheers,
Team Visifire


Visifire Silverlight and WPF Charts v3.5.2 GA Released!

somnath

Hi,

Today we have released the final version of Visifire v3.5.2 which contains the following enhancements:

  • Two new properties ActualAxisMinimum and ActualAxisMaximum are added in Axis. If AxisMinimum and AxisMaximum properties are not set in Axis then ActualAxisMinimum and ActualAxisMaximum properties will help you to get the internally calculated axis maximum and axis minimum. You can visit Visifire documentation to know more.
  • New property named ClosestPlotDistance has been implemented in Axis. It defines the distance between two closest plots where plot is a single DataPoint or a group of DataPoints which are drawn under same XValue. Plot is generic term which is applicable for all type of chart combination (Single series, Multiple Series and Multi-series stacked). Currently this property is applicable for AxisX only. You can go through Visifire documentation for more info.
  • Quality of shadow has been improved for DataSeries, DataPoints and other chart elements.
  • New property named ShadowEnabled has been added in Legend and Title.
  • Default border for Legend is applied in “Theme1″ and “Theme2″.
  • Default shadow for Legend is applied in “Theme1″ and “Theme2″.
  • New properties IncludeYValueInLegend and IncludePercentageInLegend have been added in DataSeries. IncludeYValueInLegend property will allow you to display YValue in Legend. IncludePercentageInLegend property will allow you to display percentage value in Legend. You can go through Visifire documentation for more info.
  • Previously instance of PlotArea in Chart and AxisLabels in Axis were created by default in Chart. So you were able to set properties of PlotArea and AxisLabels directly without initializing them. Now onwards the default value of PlotArea property of Chart and AxisLabels property of Axis will be null. If you are customizing PlotArea of Chart or AxisLabels of any of the Axes, you need to initialize them before you use. Please note that if Chart is already rendered then PlotArea and AxisLabels both will be initialized automatically.
    Example 1:
    Your old code
    Chart chart = new Chart();
    chart.PlotArea.Background = new SolidColorBrush(Colors.Blue);
    New code should be
    Chart chart = new Chart();
    chart.PlotArea = new PlotArea(); // You need to initialize PlotArea before you use it
    chart.PlotArea.Background = new SolidColorBrush(Colors.Blue);
    Example 2:
    Your old code
    Chart chart = new Chart();
    Axis axisX = new Axis();
    axisX.AxisLabels.FontSize = 14;
    chart.AxesX.Add(axisX);

    New code should be
    Chart chart = new Chart();
    Axis axisX = new Axis();
    axisX.AxisLabels = new AxisLabels(); // You need to initialize AxisLabels before you use it
    axisX.AxisLabels.FontSize = 14;
    chart.AxesX.Add(axisX);

This release also contains fix for the following bugs:

  • In WPF, DataTemplate for chart was not working as expected.
  • In Silverlight, Chart was not getting updated properly while working with WCF services.
  • In Silverlight 4, Chart was throwing exception in design view in Visual Studio 2010.
  • Axis was not getting updated if one or more number of DataSeries was enabled or disabled at real-time.
  • Zooming was not working as expected if Chart was inherited in another wrapper class.

Visifire v3.0.9 for Silverlight 3 has also been released with the above described features and bug fixes.

You can download Visifire v3.0.9 & v3.5.2 here.

Cheers,
Team Visifire


Visifire Silverlight and WPF Charts v3.5.2 beta 2 Released!

somnath

Hi,

This release contains the following enhancements:

  • New Property named ClosestPlotDistance has been implemented in Axis. It defines the distance between two closest plots where plot is a single DataPoint or a group of DataPoints which are drawn under same XValue. Plot is generic term which is applicable for all type of chart combination (Single series, Multiple Series and Multi-series stacked). Currently this property is applicable for AxisX. You can go through Visifire documentation for more info.
  • Quality of shadow has been improved for the DataSeries and DataPoints.
  • New Property named ShadowEnabled has been added in Legend.
  • New properties IncludeYValueInLegend and IncludePercentageInLegend have been added in DataSeries. IncludeYValueInLegend property will allow you to display YValue in Legend. IncludePercentageInLegend property will allow you to display percentage value in Legend. You can go through Visifire documentation for more info.

Get Microsoft Silverlight

Also this release contains fix for the following bugs:

  • Events were not getting detached while DataSource property of DataSeries was changed, Chart was getting removed and added back to parent.
  • In WPF, Chart was throwing exception if new Axis was added in Loaded event of Window.

Visifire v3.0.9 beta 2 for Silverlight 3 has also been released with the above described features and bug fixes.

You can download Visifire v3.0.9 beta 2 & v3.5.2 beta 2  here.

Cheers,
Team Visifire


« Previous PageNext Page »