Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 Custom Symbols for each data point?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nkilzer

8 Posts

Posted - 12 Apr 2005 :  18:08:03  Show Profile  Reply with Quote
I am trying to build a SimpleLineMarkerPlot that allows for setting the marker symbols on individual data points to different custom markers (to create a "highlighted" effect).

Is this possible? and if so, how can it be done?

Thanks in advance.

quinncurtis

1164 Posts

Posted - 12 Apr 2005 :  18:25:26  Show Profile  Reply with Quote
All symbols for a given SimpleScatterPlot are going to have the shape (ChartObj.SQUARE in the example below). Individual points can have different size, color and fill attributes, using the SimpleScatterPlot.SetSegmentAttributes method, but the shape is going to be the same. See the ScatterPoints example of the ChartTabDemo example program.

ChartAttribute attrib1 = new ChartAttribute (Color.Blue, 1,DashStyle.Solid);
attrib1.SetFillColor (Color.Blue);
attrib1.SetLineFlag(true);
attrib1.SetSymbolSize(10);
SimpleScatterPlot thePlot1 = new SimpleScatterPlot(pTransform1, Dataset1, ChartObj.SQUARE, attrib1);
//thePlot1.SetCustomScatterPlotSymbol(new Rectangle2D.Double(0,0,1,1));

thePlot1.SetSegmentAttributesMode(true);
ChartAttribute segmentAttrib = new ChartAttribute (Color.Red, 1,DashStyle.Solid, Color.Red);
segmentAttrib.SetSymbolSize(20);
thePlot1.SetSegmentAttributes(8,segmentAttrib);
thePlot1.SetSegmentAttributes(9,segmentAttrib);
thePlot1.SetSegmentAttributes(10,segmentAttrib);
thePlot1.SetSegmentAttributes(11,segmentAttrib);
chartVu.AddChartObject(thePlot1);


That should be sufficient for most high-lighting needs.

If you require a completely different shape you will need to use two SimpleDataset and two SimpleScatterPlot objects, one containing all points but the highlight point, and the other just a single point containing the highlight point.

You could also create a single Marker object, probably a ChartObj.MARKER_BOX type, and position that over an exisiting SimpleScatterPlot symbol, highlighting it.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07