try { //if(EventChart.ChartAreas[0].AxisX.PixelPositionToValue(e.Location.X) == EventChart.Series[0].ChartArea) if (e.Location.X < 0) cursorX = EventChart.ChartAreas[0].AxisX.PixelPositionToValue(0); cursorX = EventChart.ChartAreas[0].AxisX.PixelPositionToValue(e.Location.X); cursorY = EventChart.ChartAreas[0].AxisY.PixelPositionToValue(e.Location.Y); tipInfo = "Date: " + DateTime.FromOADate(cursorX); DataPoint x = new DataPoint(cursorX, cursorY); //for (int i = 0; i < 39; i++) //{ // //bool status = EventChart.Series[i].Points.Contains(x); // if (EventChart.Series[i].Points[Convert.ToInt16(EventChart.ChartAreas[0].CursorX.Position)].ToString() != null) // { // tipInfo += "\n" + GraphSeries[i]; // break; // } //} tooltip.UseFading = true; tooltip.SetToolTip(EventChart, tipInfo); tooltip.Show(tipInfo, EventChart); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)