The code I have loops through a datagridview based on the column selected and for each value in that row creates a point on a series
This is the code I've tried:
System.Windows.Forms.DataVisualization.Charting.Series FirstVallSeries = new System.Windows.Forms.DataVisualization.Charting.Series
{
Name = SelectedColumn + "-" + FilterVal1.Text,
// Color = Color.DarkBlue,
IsVisibleInLegend = true,
IsValueShownAsLabel = true,
ChartType = (SeriesChartType)Enum.Parse(typeof(SeriesChartType), ChartTypeComboBox.Text, true),
};
foreach (string e in distinctArray)
{
for (intRow = 0; intRow < dataGridView1.Rows.Count;)
{
if (dataGridView1[SelectedColumn, intRow].Value.ToString() == e)
{
if (String.IsNullOrEmpty(Convert.ToString(dataGridView1[SelectedColumn, intRow].Value)) == false)
{
firstval++;
}
}
intRow++;
}
DataPoint dp = new DataPoint();
dp.SetValueXY(e, firstval);
dp.ToolTip = string.Format("{0}, {1}", e, firstval);
FirstVallSeries.Points.Add(dp);
firstval = 0;
But when I run the App and mouse over each point in the series within the chart, the tool tip doesn't show up.
I can see the values, but no tooltip.
FirstVallSeries.MarkerSize = 20;- TaW