5

I'm using Microsoft Chart Controls (4.0), and have a line chart with several marker types. So much so, that I'm running out of markertypes. The defaults (square, triangle, circle, etc.) are insufficient.

Is it possible to add custom marker type images? For instance, I need a triangle pointed in the opposite direction.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
greggorob64
  • 2,487
  • 2
  • 27
  • 55

1 Answers1

8

You can create a opposite direction triangle image and set the marker image as

// Set an image marker for the third data point in series
Chart1.Series["Default"].Points[2].MarkerImage = "MyReverseTriangleImage.bmp";
Chart1.Series["Default"].Points[2].MarkerImageTransparentColor = Color.White;
zero7
  • 1,298
  • 8
  • 14
  • 2
    Is this going to have any significant performance degridation? My chart has upwards of hundreds of thousands of points. – greggorob64 Jul 20 '11 at 17:25
  • 2
    In my opinion that depends on your marker image size. To be sure this won't cause any performance issues, a performance test could be run with your custom image and compare to a baseline test which uses one of the default images. – zero7 Jul 20 '11 at 17:59
  • It is better to load the imges into the Chart.Images collection of NamedImages. See [here](http://stackoverflow.com/questions/34487165/net-charting-legend-marker-size/34496091?s=4|0.1173#34496091) for an example! – TaW Aug 26 '16 at 19:18