This is a migrated thread and some comments may be shown as answers.

DateTime Axis?

3 Answers 191 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Robert LeGood
Top achievements
Rank 1
Robert LeGood asked on 27 Jul 2012, 09:34 PM
Is there a DateTimeCategorial Axis for WinForms implementation of ChartView?   I'm bringing in a DataTable who CategorialValue is a field that's a date, but it's sorting it as if it's a string.

Also, after upgrading to Q2, I seem to no longer have "RadChart" in my toolbox.   Would really like to go back to using RadChart based on how extremely limited the functionality of ChartView is.

Thanks

Rob.

3 Answers, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 30 Jul 2012, 11:34 AM
Hi Rob,

Thank you for writing.

Both DateTime axes are currently under development. We will do our best to introduce them in Q3 2012. You mentioned that the functionality of RadChartView is extremely limited. Would you please share what other difficulties / missing features you have encountered?

As for RadChart, to add it back to your Toolbox follow these steps:

1. Create a new UserControl and make it inherit RadChart:
public partial class UserControl1 : RadChart
{
    public UserControl1()
    {
        InitializeComponent();
    }
}

2. Make sure that the AutoToolboxPopulate option is set to true. To do so, navigate through Tools > Options > Windows Forms Designer > General : AutoToolboxPopulate.

3. Build your project and the newly created user control should appear in your Toolbox.

I hope my answer helps. Let me know if you have further queries.

Kind regards,
Boryana
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Robert LeGood
Top achievements
Rank 1
answered on 31 Jan 2013, 11:02 PM
Hi all,

Finally coming back to my project after a haitus and pleased to see support for DateTime axes in the ChartView control.  Question:  Does this work if you're binding to a datatable?  For example, my code looks something like..

DateTimeContinuousAxis axis = new DateTimeContinuousAxis();
axis.PlotMode = AxisPlotMode.BetweenTicks;
axis.LabelFormat = "{0:d}";
 
DataTable dt = SomeDataTable();
 
LineSeries ls = new LineSeries();
 
ls.ValueMember = "Apples";
ls.CategoryMember = "CollectionDate";
ls.DataSource = dt;
 
ls.HorizontalAxis = axis;
 
rcvMain.Series.Add(ls);

When I run it, however, I get no lines and a blank horizontal axes.  (actually, sometimes I get repeated X-Axis lines)   Any thoughts on what I may be doing wrong?

Thanks!!
0
Ivan Petrov
Telerik team
answered on 05 Feb 2013, 01:36 PM
Hi Rob,

Thank you for your reply.

I do not see anything wrong in your code or anything that would make the chart not function properly. I have attached an example project which is pretty much identical to your example that works well on my machine. Can you please review my example and see if there are any differences with what you have. I have created my test project with Q3 2012 version of the controls suite.

I hope this will be useful. Should you need further assistance, I would be glad to help.

Regards,
Ivan Petrov
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
ChartView
Asked by
Robert LeGood
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Robert LeGood
Top achievements
Rank 1
Ivan Petrov
Telerik team
Share this question
or