Author |
Topic  |
|
nkilzer
8 Posts |
Posted - 12 Apr 2005 : 18:08:03
|
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
|
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.
|
 |
|
|
Topic  |
|
|
|