Visifire v1.5.8 released
ChiragHi,
As promised we are supporting both Visifire 1.x & Visifire 2.x in parallel. In this release of Visifire 1.x series, we have added Date support for AxisX. One of our premium customer got this feature developed. Now, we are releasing it to public. We have introduced new property – XValueType in AxisX, it can be either Numeric or DateTime. Interval Type for the AxisX is Day. Date can be set to property – XValue of DataPoint. Date can be formatted using property – ValueFormatString of AxisX.

Visifire Chart with Date Axis
Below is the Managed Code Snippet using Date support for AxisX.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Visifire.Charts;
using Visifire.Commons;
namespace ChartApp
{
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
CreateChart();
}
private void CreateChart()
{
Chart chart = new Chart();
chart.Height = 300;
chart.Width = 500;
// Creating AxisX
AxisX axisX = new AxisX();
axisX.XValueType = XValueTypes.DateTime;
// Date time standard format
axisX.ValueFormatString = "d/M/yyyy";
// To avoid auto skip
axisX.Interval = 1;
chart.Children.Add(axisX);
//Creating DataSeries
DataSeries dataSeries = new DataSeries();
dataSeries.RenderAs = "Column";
// Adding 1st DataPoint
DataPoint dp = new DataPoint();
dp.XValue = new DateTime(2008,2,1);
dp.YValue = 345;
dataSeries.Children.Add(dp);
// Adding 2nd DataPoint
dp = new DataPoint();
dp.XValue = new DateTime(2008, 2, 4);
dp.YValue = 222;
dataSeries.Children.Add(dp);
// Adding 3rd DataPoint
dp = new DataPoint();
dp.XValue = new DateTime(2008, 2, 20);
dp.YValue = 533;
dataSeries.Children.Add(dp);
// Adding DataSeries to Chart
chart.Children.Add(dataSeries);
this.LayoutRoot.Children.Add(chart);
}
}
}
Below is the XML Snippet using Date support for AxisX.
<vc:Chart xmlns:vc=”clr-namespace:Visifire.Charts;assembly=Visifire.Charts” Theme=”Theme1″>
<vc:Title Text=”Date Axis”/>
<vc:AxisX XValueType=”DateTime” ValueFormatString=”d/M/yyyy” Interval=”1″/>
<vc:DataSeries RenderAs=”Column”>
<vc:DataPoint XValue=”2/1/2008″ YValue=”345″/>
<vc:DataPoint XValue=”2/4/2008″ YValue=”222″/>
<vc:DataPoint XValue=”2/20/2008″ YValue=”533″/>
</vc:DataSeries>
</vc:Chart>
Download Visifire v1.5.8 here.
Cheers,
Team Visifire


Comments(2)
Hi,
In witch release of Visifire 2.x series you will add Date support for AxisX?
Thanks
Saud,
We haven’t decided it yet. Our first priority is to bring Visifire 2.x out of beta. Once it is done, we will take up things from wishlist including this one.
Regards,
Chirag