Skip to content

Commit

Permalink
add for hygon only
Browse files Browse the repository at this point in the history
  • Loading branch information
ghfan authored and ghfan committed Mar 21, 2019
1 parent 1b90e4e commit efd6f2c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
13 changes: 8 additions & 5 deletions public/wafer_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class WaferMap extends EventEmitter {

this._nextCol = 1;


this._waferLot = '';


}
Expand All @@ -163,7 +163,7 @@ class WaferMap extends EventEmitter {
this._isCanvas = (options.chartType === 'Canvas' ? true : false);
}

setData(minZ, maxZ, x, y, data, row, series, colorCategory) {
setData(minZ, maxZ, x, y, data, row, series, colorCategory, waferLot) {
//this._x = [];
//this._y = [];
this._minZ = minZ;
Expand All @@ -174,6 +174,7 @@ class WaferMap extends EventEmitter {
this._row = row;
this._series =series;
this._colorBucket = (colorCategory === 2 ? 1 : 9);
this._waferLot = waferLot;
//this._xTitle = xTitle;
//this._yTitle = yTitle;
}
Expand Down Expand Up @@ -297,7 +298,7 @@ class WaferMap extends EventEmitter {
let chartWidth = 0; // = xWidth - neighbor
let chartHeight = 0;
let spaceCellCnt = 1.5;

let waferLot = this._waferLot;

this._emptyDOM();

Expand Down Expand Up @@ -515,7 +516,8 @@ class WaferMap extends EventEmitter {
var yCoordTitle = lty + chartHeight -this._marginNeighbor;
yCoordTitle = cellHeight < 10 ? yCoordTitle + 8 : yCoordTitle;
if (this._series) {
drawText(this._context, this._words[tableNo].title, ltx + (maxX + 1)* cellWidth / 2, yCoordTitle, '10 10px Roboto, sans-serif');
var myTitle = this._words[tableNo].title.split(':');
drawText(this._context, waferLot + ',' + myTitle[1] + ': ' + myTitle[0], ltx + (maxX + 1)* cellWidth / 2, yCoordTitle, '10 10px Roboto, sans-serif');
}

if (tableNo % this._columnCnt === 0) {
Expand Down Expand Up @@ -674,8 +676,9 @@ class WaferMap extends EventEmitter {
var yCoordTitle = lty + chartHeight -this._marginNeighbor;
yCoordTitle = cellHeight < 10 ? yCoordTitle + 8 : yCoordTitle;
if (this._series) {
var myTitle = this._words[tableNo].title.split(':');
var xSeriesTitle = this._svgGroup.append("text")
.text(this._words[tableNo].title)
.text(waferLot + ',' + myTitle[1] + ': ' + myTitle[0])
.attr("x",
ltx + (maxX + 1) * cellWidth / 2
)
Expand Down
10 changes: 9 additions & 1 deletion public/wafer_map_visualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,14 @@ export class WaferMapVisualization {
x[columnNo] = columnNo;
columnNo++;
}
this._waferMap.setData(minZ, maxZ, x, y, response.tables, this._row, this._series, category.length);
var filters = this._vis.searchSource._fields.filter;
var waferLot = '';
filters.forEach(function(filter){
var meta = filter.meta;
if (meta.key === "WaferLot"){
waferLot += meta.value;
}
});
this._waferMap.setData(minZ, maxZ, x, y, response.tables, this._row, this._series, category.length, waferLot);
}
}

0 comments on commit efd6f2c

Please sign in to comment.