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

ChartDataTable limit number of visible columns

4 Answers 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 23 Aug 2012, 08:08 AM
I am setting the PlotArea.DataTable.Visible to true, so that my series data are shown as values in a table below my chart. However, I have a lot of datapoints plotted in the chart so I would like to limit the number of columns shown. Something like the LabelStep functionality for Labels. Is there any way to do that with the ChartDataTable?

See the attached file for my current ChartDataTable presentation.

Best Regards,
Erik

4 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 28 Aug 2012, 12:58 PM
Hi Erik,

 Currently there is no way to control which values should be shownin the DataTable. What  I can suggest is that you modify the cell dimensions so that your values does not overlap. This can be done as follows:

<PlotArea>
           <DataTable>
               <Appearance CellHeight="20" CellWidth="50" RenderType="CellFixedSize">
               </Appearance>
           </DataTable>
       </PlotArea>

However the most suitable solution in your case would be to reduce the number of items in your chart as so much values makes it hardly readable.

All the best,
Evgenia
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Erik
Top achievements
Rank 1
answered on 31 Aug 2012, 10:29 AM
Thank you Evgenia,

I am currently opting for the second solution; to reduce the amount of datapoints in my chart. 

However, this is not an optimal solution, as the chart lines becomes more inaccurate.

Is it possible that the functionality of a "column step" in ChartDataTable can be implemented in the future? I guess that this is an issue that a lot of developers would benefit from (instead of writing their own code for excluding datapoints within a dataseries) .

Best regards,
Erik
0
Steve
Telerik team
answered on 03 Sep 2012, 02:36 PM
Hello Erik,

The chart item in Telerik Reporting uses the engine of RadChart for ASP.NET AJAX, which development has been frozen, so there would be no new features added to this chart. We would consider this feature when working on a new chart item for the reporting product.

Kind regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Erik
Top achievements
Rank 1
answered on 12 Nov 2012, 01:44 PM
It is possible to limit the number of columns shown if you set the xaxis programmatically. 

Like this:

var caiCollection = new ChartAxisItemsCollection();
 
List<object> list_of_objects;
 
int[] position_on_xaxis= { 0 };
 
// Step through your series and select the points you want,
foreach (var item in list_of_objects)
{
    if (item = <select_this_object>)
    {
        var cai =   new ChartAxisItem("<item text value>") { Value = position_on_xaxis[0] };
 
        // add to chartaxisitemcollection
        caiCollection.Add(cai);
 
        // Increment to select next position on xaxis
        position_on_xaxis[0]++;
    }
}
 
// Add the xaxis to the chart
_chartDefinition.PlotArea.XAxis.AddItem(caiCollection);

Then you can put as many YAxis values as you want by setting the XValue on each dataseries item, without messing up the chart datatable.

Hope this is useful...

Best regards,
Erik
Tags
General Discussions
Asked by
Erik
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Erik
Top achievements
Rank 1
Steve
Telerik team
Share this question
or