title: Interactive Chart with MS Chart Control VB
body: <p>Hi I'am currently creating a Chart to and img and display it in view. But I would like to make it a little more interactive ... eg. when user put mose over point (in point chart) he can see the values of this point.</p>
  
  <p>Here I create and image of an chart</p>
  
  <pre><code>Function GenerateChart(id As Integer, width As Integer, height As Integer) As ActionResult
  
      ' Creating chart
      Dim chart = New Chart()
      Dim area = New ChartArea()
      Dim series = New Series()
  
      chart.Width = width
      chart.Height = height
  
      ' Adding Series to the Chart
      chart.Series.Add("ValueSeries")
      chart.Series("ValueSeries").XValueMember = "Date"
      chart.Series("ValueSeries").YValueMembers = "Value"
      chart.Series("ValueSeries").ChartType = SeriesChartType.Point
      'chart.Series("ValueSeries1").AxisLabel = "Label"
  
      ' Getting data for series
      chart.DataSource = GetDataForChart(id)
      chart.DataBind()
  
      chart.ChartAreas.Add(New ChartArea())
  
      ' Saving chart as file
      Dim returnVal = New MemoryStream()
      chart.SaveImage(returnVal)
  
      'Return adress for file
      Return File(returnVal.GetBuffer(), "image/png")
  End Function
  </code></pre>
  
  <p>are there any special properties that i may add to make it interactive ? And if I add them maybe I should return something diffrant than an image ?\</p>
  
  <p>EDIT 1</p>
  
  <p>I have read about tool tips .... but you have to set each tooltip for each series value and still i am not sure if tooltips works when you save chart as img but 'll try it </p>