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

Documentation of new Version

6 Answers 197 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 20 Jul 2012, 07:05 PM
Hi,

I can understand if major changes have to be made to a module because of poor or faulty structural prior constructs.

All developers develop... (we all know of times where we didn't know... and made decisions...)

My frustration with the new version of the ChartView module is that I can't find the appropriate documentation - and I can't find examples. I have spend hours reviewing, checking, comparing and getting frustrated. For me, this has been a time consuming update. I believe the new charting module will have many possible advantages for the future but I have to get rolling in the here and now. 

Could you give me links of examples. I might be missing some simple issues. But they are missing for me. I have a simple example: 
BarSeries barSeries = new BarSeries("Anzahl", "mySelection");
barSeries.ValueMember = "Anzahl";
barSeries.CategoryMember = "mySelection";
radChartView1.Series.Add(barSeries);
radChartView1.DataSource = dt;


Why shouldn't that work? I get the grid, the values on the x and y axes but not the data (the bars) displayed in the area.

However, it works if I do a Lineseries. However, lines are not appropriate in this application.

Waiting for your feedback,

Karl








6 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 25 Jul 2012, 08:39 AM
Hello Karl,

The problem is caused by the DataSource setting of RadChartView control. We found some issues related to the usage of the DataSource property of RadChartView and the order of the setup of DataSource, Value and CategoryMember properties. The issue is already resolved and the fixes will be available in Q2 2012 SP1 release, planed to be available for download by the end of this week. Currently, you can use the following work around:
myList = new BindingList<MyCustomObject>();
 
myList = new BindingList<MyCustomObject>();
myList.Add(new MyCustomObject(1, "Outdoor"));
myList.Add(new MyCustomObject(8, "Hardware"));
myList.Add(new MyCustomObject(3, "Tools"));
myList.Add(new MyCustomObject(6, "Books"));
myList.Add(new MyCustomObject(2, "Appliances"));
 
BarSeries barSeria = new BarSeries();
radChartView1.Series.Add(barSeria);
 
barSeria.DataSource = myList;
barSeria.ValueMember = "MyInt";
barSeria.CategoryMember = "MyString";

More information about data binding RadChartView can be found in our online documentation.

I hope this helps. Do not hesitate to contact us if you have further questions or issues.  

All the best,
Julian Benkov
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Karl
Top achievements
Rank 1
answered on 25 Jul 2012, 04:39 PM
Hi Julian,

I thought it might interest you: I copied your code and (public class MyCustomObject : INotifyPropertyChanged) from the documentation and played with it. In the end it doesn't change the symptoms I have. I get the grid, the x and y axis and the values of both axis but no bar.  You might want to check this out before the release of Q2 2012 SP1.

Another small issue on the side: Did anything change in respect to themes and radchartview? I see this palette idea, but actually I was quite happy just using the supplied themes and hope to be able to continue using them.

Have a nice day,
Karl  
0
Julian Benkov
Telerik team
answered on 27 Jul 2012, 02:12 PM
Hi Karl,

1) I not found any issues with BarSeries rendering after binding operation. Please send me a sample application with your scenario to investigate the issue locally.

2) The default mechanism of RadChartView control get colors from the currently applied theme to render its content. The Palette mechanism is applied only when you explicitly set the Palette property of ChartView. The current version of RadChartView control supports only the ControlDefault theme. In the next our major release we will add all other predefined themes.

Thank you for your time and cooperation. 

Greetings,
Julian Benkov
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Karl
Top achievements
Rank 1
answered on 27 Jul 2012, 03:45 PM
Hi Julian,


private void FillTableAndConnect2Chart(String mySQL)
{
    DataTable dt = new DataTable();
    System.Data.OleDb.OleDbConnection dbConn1 = new System.Data.OleDb.OleDbConnection(dbconn);
    dbConn1.Open();
    OleDbDataAdapter da = new OleDbDataAdapter(mySQL, dbConn1);
    try
    {
        da.Fill(dt);
    }
    finally
    {
        dbConn1.Close();
    }
             myList = new BindingList<MyCustomObject>();
             myList.Add(new MyCustomObject(1, "Outdoor"));
             myList.Add(new MyCustomObject(8, "Hardware"));
             myList.Add(new MyCustomObject(3, "Tools"));
             myList.Add(new MyCustomObject(6, "Books"));
             myList.Add(new MyCustomObject(2, "Appliances"));
             BarSeries barSeria = new BarSeries();
             radChartView1.Series.Add(barSeria);
             barSeria.DataSource = myList;
             barSeria.ValueMember = "MyInt";
             barSeria.CategoryMember = "MyString";
}


With the above code I get the x & y axis with corresponding Names and values x and y but no bars!

Karl
0
Karl
Top achievements
Rank 1
answered on 29 Jul 2012, 03:57 PM
Hi Julian,

I am happy to have installed the latest update and now I have one problem less. I can now see a rectangle representing my data. However... I still have an issue with the ability to change anything else... 

Here are just some of the issues:

Where is the documentation for the new version? What is the link? I am having problems like:

a) How to change orientation? I used to be able to do it this way:
radChart1.SeriesOrientation = Telerik.Charting.ChartSeriesOrientation.Horizontal;

b) What is this forecolor about:
barSeries.ForeColor = Color.Azure; - does not change any color of anything
...neither using any KnownPalette ...

c) ShowToolTip (by the way a cool idea): the label is shown (a rectangle) but the content stays invisible

d) What is radChartView1.Text? Nothing shows anywhere

e) What happened to radChart1.ChartTitle.TextBlock.Text ?

...most likely there are a number of other issues...

Please let me know if I am the only one with these issues...

Karl
0
Julian Benkov
Telerik team
answered on 31 Jul 2012, 02:33 PM
Hi Karl,

a) The Orientation property exists and is valid only for the CartesianArea chart type and applies to BarSeries, LineSeries, AreaSeries, ScatterSeries. Here is a example:
chartView.GetArea<CartesianArea>().Orientation = Orientation.Horizontal;

b) The charts series use their BackColor property and palettes to apply the color of the background. The ForeColor property is used for modifying the color of the text and border.

c) Please send us a sample project that demonstrate the invalid rendering, so we can investigate it locally and find a solution for the case.

d) This property is inherited from RadControl and currently does not have any representation in RadChartView control.

e) The current implementation of RadChartView does not support setting and rendering of Titles. We will do our best to fit this feature in the next major extension of RadChartView control, which should be for Q3 2012.

I hope this information is helpful. Let me know if you need further assistance. 

Kind regards,
Julian Benkov
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
ChartView
Asked by
Karl
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Karl
Top achievements
Rank 1
Share this question
or