ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Polar Chart set different name foreach hot spot
Posted by Bruce on May-31-2024 09:37
I use polar scatte chart to show wafer map, hot spot as defect on wafer. It work well. But when I add different kinds of defects. One kind of defects has same name. Here are code.

//different kind of defect for each iterator
for(int i =0;i<filterTable.Rows.Count;i++){

double[] rs = new double[filterTable.Rows.Count]; //radius
double[] ts = new double[filterTable.Rows.Count]; //theta
   int colorValue = int.Parse(defectClass.BinColor) & 0x00FFFFFF;
   PolarLineLayer layer2 = c.addLineLayer(rs, colorValue, defectClass.ClassName); //all these defects hot spots are same defectclass.name, I cannot set different name for each hot spots.
   layer2.setAngles(ts);
   layer2.setLineWidth(0);
   layer2.setDataSymbol(Chart.SquareSymbol, size);

}

So how can I set different name for each hot spots

  Re: Polar Chart set different name foreach hot spot
Posted by Peter Kwan on Jun-02-2024 17:44
Hi Bruce,

The code in your message seems incomplete. I only see one defectClass object in your code, so it is normal all the points will have the same name.

The following is an example illustrating scatter points with different names.

https://www.advsofteng.com/doc/cdnet.htm#polarscatter.htm

In brief, if you want the points to have different names, please call addLineLayer multiple times for the different kinds of points, and using different names.

The structure is like:

--- get the coordinates of the points with defectClass1 into the arrays rs1 and ts1 ...
PolarLineLayer layer1 = c.addLineLayer(rs1, int.Parse(defectClass1.BinColor) , defectClass1.ClassName);
layer1.setAngles(ts1);
layer1.setLineWidth(0);
layer1.setDataSymbol(Chart.SquareSymbol, size);

--- get the coordinates of the points with defectClass2 into the arrays rs2 and ts2 ...
PolarLineLayer layer2 = c.addLineLayer(rs1, int.Parse(defectClass2.BinColor) , defectClass2.ClassName);
layer2.setAngles(ts1);
layer2.setLineWidth(0);
layer2.setDataSymbol(Chart.SquareSymbol, size);


Of course, you can also use a loop to iterate the various defectClass, like:


MyDefectClassType[] allDefectClass = { defectClass1, defectClass2 };
for(int i = 0; i < allDefectClass.Length; ++i) {
    --- get the coordinates of the points with allDefectClass[i] into the arrays rs and ts ...
    PolarLineLayer layer = c.addLineLayer(rs, int.Parse(allDefectClass[i].BinColor),
        allDefectClass[i].ClassName);
    layer.setAngles(ts);
    layer.setLineWidth(0);
    layer.setDataSymbol(Chart.SquareSymbol, size);
}


Best Regards
Peter Kwan