Candlestick: exclude unmapped fields by default (#42011)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
Ryan McKinley
2021-11-19 16:39:21 -08:00
committed by GitHub
parent 8a06e89d2f
commit 403222e14e
5 changed files with 86 additions and 11 deletions

View File

@@ -320,11 +320,14 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ sync: DashboardCursor
// hook up custom/composite renderers
renderers?.forEach((r) => {
if (!indexByName) {
indexByName = getNamesToFieldIndex(frame, allFrames);
}
let fieldIndices: Record<string, number> = {};
for (let key in r.fieldMap) {
let dispName = r.fieldMap[key];
fieldIndices[key] = indexByName!.get(dispName)!;
fieldIndices[key] = indexByName.get(dispName)!;
}
r.init(builder, fieldIndices);