Profile Picture

Tooltip Line Chart

Posted By Marc Welk 13 Years Ago
Author
Message
Marc Welk
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 2, Visits: 1
Hello,

i create a simple Line Chart in a Web-Application. Now i want to add Tooltips for each DataPoint. The Problem is when i want to create a Line Chart with over 20000 DataPoints, first the Browser
load the Application very slow, second the CPU Usage came from 5% to 30% and third when i move the Mouse over an DataPoint the CPU Usage become 50%.
Firefox works very slow but it works. The IE8 crashed with each Mouse over.

I sampled two Methods to add Tooltips, but both bring the same results :

first :

ncwc:NChartControl
ID="NChartControl1"
runat="server">
ncwc:NChartControl>

Dim CH As NCartesianChart = NChartControl1.Charts(0)

Dim line As NLineSeries = CType(CH.Series(b), NLineSeries)

line.Values.AddRange(CType(yValues(b), ArrayList))
line.XValues.AddRange(CType(xValues(b), ArrayList))

For i As Integer = 0 To line.Values.Count - 1
Dim DateVal As DateTime = Convert.ToDateTime(line.XValues(i))
Dim tt As String = String.Format("X: {0}, Y: {1}", CStr(DateVal), line.Values(i))
line.InteractivityStyles.Add(i, New NInteractivityStyle(tt))
Next

second :

ncwc:NChartControl
id="nChartControl1"
runat="server"
AjaxEnabled="True"
AsyncAutoRefreshEnabled="False"
AsyncCallbackTimeout="10000"
AsyncRequestWaitCursorEnabled="False"
OnQueryAjaxTools="nChartControl1_QueryAjaxTools">
ncwc:NChartControl>

Dim CH As NCartesianChart = NChartControl1.Charts(0)

Dim line As NLineSeries = CType(CH.Series(b), NLineSeries)

line.Values.AddRange(CType(yValues(b), ArrayList))
line.XValues.AddRange(CType(xValues(b), ArrayList))

For i As Integer = 0 To line.Values.Count - 1
Dim DateVal As DateTime = Convert.ToDateTime(line.XValues(i))
Dim tt As String = String.Format("X: {0}, Y: {1}", CStr(DateVal), line.Values(i))
line.InteractivityStyles.Add(i, New NInteractivityStyle(True, Nothing, tt))
Next

Protected Sub nChartControl1_QueryAjaxTools(ByVal sender As Object, ByVal e As EventArgs)
nChartControl1.AjaxTools.Add(New NAjaxTooltipTool(True))
End Sub


I hope anyone understand my problem and can help me, because in this Case the Tooltips are very important ...


thanks Marc

PS: sorry for my bad english




Similar Topics


Reading This Topic