Page 1 of 1
Server Side Scrolling/Paging
Posted: Thu Nov 27, 2008 6:13 pm
by 13048070
Hi,
Please could someone help with the following:
I'm using a TeeChart V3 WebChart control in an ASP.NET page.
I have a large amount of time series data (e.g. >300,000 rows) that I wish to show on a chart. The table has 3 fields, an ID, DateTime and a value field, for example
ID DateTime Value
1 01/01/2008 00:00:01 101
2 01/01/2008 00:00:02 105
3 01/01/2008 00:00:03 110
.
.
.
300000 01/07/2008 00:00:00 100
I'd like to implement the same kind of solution that was used in the TeeChart Scrolling Example to move through my data, except that instead of loading all the data at once the first time the page is loaded, I'd like to make it so that each time the scroll bar is clicked it actually retrieves data from the server and refreshes the chart - similar to the way that you might do when paging through a large amount of data in a data grid.
Could someone show me a worked example of how to do this? Also is it possible to achieve this when TempChart="File" rather than tempchart="Httphandler" as I always get a red X displaying on my page when I use this.
(I already have a stored proc that retrieves data based on current page and page size parameters etc.)
Thanks,
Norman
Posted: Thu Nov 27, 2008 7:00 pm
by narcis
Hi Norman,
Could someone show me a worked example of how to do this?
At Christopher Ireland's example below it's shown how to emulate paging functionality setting bottom axis scales. It's also commented in code for changing pages. You can activate paging setting
Chart.MaxPointsPerPage property. Assigning zero sets it back to automatic.
http://www.teechart.net/support/viewtop ... 2747#32747
Also is it possible to achieve this when TempChart="File" rather than tempchart="Httphandler" as I always get a red X displaying on my page when I use this.
This may be due to the default security configuration of IIS6.0. File charts by default are stored at
C:\Program Files\Steema Software\TeeChart for .NET v3\TeeChartForNET\_chart_temp
_chart_temp is a folder created by TeeChart for .NET to temporaly save the images showed in the web page. You will have to grant permissions to store them.
TeeChart uses the registry LocalMachine path
HKEY_LOCAL_MACHINE\SOFTWARE\Steema Software\TeeChart.NET\VirtualShare to determine on what URL to acces the temporary chart files.
It uses
HKEY_LOCAL_MACHINE\SOFTWARE\Steema Software\TeeChart.NET\ShareFolder to set where to save the files to.
Hope this helps!
Posted: Fri Nov 28, 2008 5:16 pm
by 13048070
Hi NarcĂs,
The problem with Httphandler doesn't seem to be related to security issue. I say this because, I can see the scrolling chart in the ASP.NET demo app, and I also created a copy of scrolltool.aspx and added it to my own project (in a different location) and it worked fine.
The problem may relate to the way I'm trying to implement it. I'm using the DotNetNuke framework. The webchart is on a usercontrol (i.e. .ascx) and this usercontrol gets added to the main page dynamically at runtime. Have you ever tried anything like this?
If I cant solve the Httphandler issue does this stop me from implementing scrolling as illustrated in the example? Can I use File, Session or Cache to implement the same thing? Can you describe all the settings I have to set in order to get scroll bars to appear on a webchart just so I know I'm doing it right. I can't ever get them to appear.
Also, can you tell me if I have to save all the chart settings between postbacks? I thought I could set some settings when the page is first requested (i.e. when Page.IsPostBack = false) and they would get remembered between postbacks. If I add a standard label control and set the caption in a similar fashion it does. Whats the difference between having the charts EnableViewState setting set to True or False?
Sorry for all the questions but it I cant get the basics to work.
Thanks,
Norman
Posted: Mon Dec 01, 2008 8:39 am
by narcis
Hi Norman,
The problem may relate to the way I'm trying to implement it. I'm using the DotNetNuke framework. The webchart is on a usercontrol (i.e. .ascx) and this usercontrol gets added to the main page dynamically at runtime. Have you ever tried anything like this?
I'm not sure about that. I haven't done such tests but I don't know if any of my colleagues has. However I think it should work fine.
If I cant solve the Httphandler issue does this stop me from implementing scrolling as illustrated in the example? Can I use File, Session or Cache to implement the same thing? Can you describe all the settings I have to set in order to get scroll bars to appear on a webchart just so I know I'm doing it right. I can't ever get them to appear.
Yes, any TempChart property setting can be used. You said it worked fine for you using the ASP.NET demo at your end and that you could make a copy of the scrolling example? You should do the same as what's shown there. At most, only the scroll tool is being created at designtime all other settings are done at runtime.
Also, can you tell me if I have to save all the chart settings between postbacks? I thought I could set some settings when the page is first requested (i.e. when Page.IsPostBack = false) and they would get remembered between postbacks. If I add a standard label control and set the caption in a similar fashion it does. Whats the difference between having the charts EnableViewState setting set to True or False?
You need to save the chart as a native template as shown in the ASP.NET example demo. I'm afraid EnableViewState is not suficient for loading all chart settings. That's what EnableViewState does:
http://msdn.microsoft.com/en-us/library ... state.aspx