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

delay when XScale is bigger than 1

2 Answers 29 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Technology
Top achievements
Rank 1
Technology asked on 19 Nov 2010, 11:15 AM
Dear Telerik support,

I have a datatable with 2 fields (Vessel, Totals) and 150 rows.
I want to use Bar Char type in horizontal orientation. The rows are to many so i need to use scrollbars.
The following properties are changed:
EnableAxisMarkers: False
EnableZoom: False
ScrollMode: XOnly
XScale: 5
XScrollOffset: 0

The chart is taking to long, in order to show the bars, in every scroll page (about 20-30 sec).
Is there anything wrong with the control, or am i doing something wrong?
Or is there any way to set the height of chart according the rows of the datatable? (example: 3 rows, height=200. 150 rows, height = 1000).

Below is the code, that i use to get the data from a SQL Store Procedure:

Protected Sub btnShowChart_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnShowChart.Click
 
     chTotal.DataSource = GetChartData()
     chTotal.DataBind()
 
 End Sub
 
 
 Private Function GetChartData() As DataTable
 
     Dim pCustomerID As New SqlClient.SqlParameter("@CustomerID", 8)
     Dim pFromPeriodID As New SqlClient.SqlParameter("@FromPeriodID", 8)
     Dim pToPeriodID As New SqlClient.SqlParameter("@ToPeriodID", 8)
     Dim pHasPPCTotals As New SqlClient.SqlParameter("@HasPPCTotals", SqlDbType.TinyInt)
 
     pCustomerID.Value = Session("CustomerID")
 
     If cbPPCTotal.Checked = True Then
         pHasPPCTotals.Value = 1
     Else
         pHasPPCTotals.Value = 0
     End If
     pFromPeriodID.Value = cbDateFromChart.SelectedValue
     pToPeriodID.Value = cbDateUntilChart.SelectedValue
 
     Dim tblResults As DataTable = ExecuteDataTable(ConnectionStrings.BilConnString, "GetCustomerSpendVessel", New Object() {pCustomerID, pFromPeriodID, pToPeriodID, pHasPPCTotals})
 
     chTotal.Series(0).DataYColumn = "Total"
     chTotal.PlotArea.XAxis.DataLabelsColumn = "Vessel"
     chTotal.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 0
     chTotal.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.DarkBlue
     chTotal.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Charting.Styles.Unit.Percentage(12)
 
     GetChartData = tblResults
 
 End Function


I Use:
VS ASP.NET 2008 (VB)
ASP.NET AJAX v.2010.3.1109.35 Trial

Thank you in advance for your time.

Best Regards,
Navarino Technology Department.

2 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 24 Nov 2010, 03:21 PM
Hello Technology,

We were unable to reproduce the problematic performance when the chart is bound to a DataTable holding 150 records (see the attached application) and we are unsure whether it is related to the control itself -- we would suggest you to check your SQL procedure to make sure it is optimized correctly as well.

As for setting chart height -- you can use the RadChart.Height property.


Kind regards,
Freddie
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Technology
Top achievements
Rank 1
answered on 03 Dec 2010, 11:16 AM
dear Freddie ,

i found the problem.
I had shadows. When i removed the shadows from the bars, everything become faster.

Thank you for your support.
Tags
Chart (Obsolete)
Asked by
Technology
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Technology
Top achievements
Rank 1
Share this question
or