Custom MarkerStyles possible in Microsoft Chart Controls? [duplicate]
Asked Answered
J

1

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.

Jakob answered 13/7, 2011 at 16:39 Comment(2)
What is the exact product name? For example, is it Dundas Chart or Microsoft Chart Controls?Urias
Product name is "Microsoft Charts Controls" archive.msdn.microsoft.com/mschartJakob
A
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;
Androcles answered 20/7, 2011 at 17:11 Comment(3)
Is this going to have any significant performance degridation? My chart has upwards of hundreds of thousands of points.Jakob
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.Androcles
It is better to load the imges into the Chart.Images collection of NamedImages. See here for an example!Muskellunge

© 2022 - 2024 — McMap. All rights reserved.