Is there a way to show hidden column data in the tool tip on an ultrchart line chart? I have set the tool tip style to custom. Code snippet below:
da = New SqlDataAdapter
da.SelectCommand = cmd
dsPPChartData = New DataSet
da.Fill(dsPPChartData, "PPChartData")
cn.Close()
If dsPPChartData.Tables("PPChartData").Rows.Count > 0 Then
ppChart.DataSource = dsPPChartData
ppChart.Data.IncludeColumn("Track", False)
ppChart.Data.IncludeColumn("Race", False)
ppChart.Data.IncludeColumn("Distance", False)
ppChart.Data.IncludeColumn("Surface", False)
ppChart.Data.IncludeColumn("Class", False)
ppChart.Visible = True
Else
ppChart.Visible = False
End If
I would like to display the columns that are not included on the chart in the custom tool tip.
Thank you.
Hi,
You can try using IRenderLabel interface.
http://help.infragistics.com/NetAdvantage/WinForms/2011.1/CLR2.0/?page=Chart_Customize_Labels_Using_the_IRenderLabel_Interface.html
In your case “public string ToString(Hashtable context)” method could be something like:
public class MyLabelRenderer : IRenderLabel
{
public string ToString(Hashtable context)
int row = (int)context["DATA_ROW"];
int column = (int)context["DATA_COLUMN"];
return dataTable.Rows[row][column + 1].ToString();
}