Add support for a new curve data format in the Curves package converter system
日本語の概要は準備中です。原文の説明を表示しています。
Create a custom filter for Datagrok by extending DG.Filter
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Create a custom filter widget for the Datagrok filter panel.
/create-custom-filter [filter-name] [package-path]
When this skill is invoked, help the user create a custom filter by extending DG.Filter.
Create a new TypeScript file in the package's src/filters/ directory.
The class must extend DG.Filter and implement the filtering logic. When the filter state changes, call this.dataFrame.filter to update the bitset.
import * as DG from 'datagrok-api/dg';
export class MyFilter extends DG.Filter {
constructor() {
super();
// Initialize filter state
}
attach(dataFrame: DG.DataFrame): void {
super.attach(dataFrame);
// Set up UI, subscribe to events
this.column = dataFrame.columns.byName(this.columnName);
this.render();
}
applyFilter(): void {
// Apply filtering logic to this.dataFrame.filter (a DG.BitSet)
let filter = this.dataFrame.filter;
for (let i = 0; i < this.dataFrame.rowCount; i++)
filter.set(i, this.shouldInclude(i), false);
filter.fireChanged();
}
private render(): void {
// Build the filter's UI
this.root.appendChild(/* UI elements */);
}
}
Use the decorator approach (preferred for datagrok-tools >= 4.12.x):
@grok.decorators.filter({
semType: 'Country', // optional: auto-apply to columns with this semantic type
})
export class MyFilter extends DG.Filter {
/* ... */
}
Or use the function annotation approach in package.ts:
//name: My Filter
//description: A custom filter
//tags: filter
//output: filter result
export function myFilter() {
return new MyFilter();
}
The filter can be invoked via JS API:
let tv = grok.shell.addTableView(grok.data.demo.demog());
tv.filters({filters: [
{type: 'MyPackage:myFilter', columnName: 'race'},
]});
Or added through the UI via the filter panel.
semType option in the decorator auto-applies the filter to columns with that semantic typethis.dataFrame.filter.set(i, value, notify) to include/exclude rows; call fireChanged() afterroot property is the HTMLElement where you build the filter's UIattach() is called when the filter is attached to a dataframepublic/packages/Widgets/src/filters/radio-button-filter.tsDG.Filter with proper filtering logicimport * as DG from 'datagrok-api/dg', import * as grok from 'datagrok-api/grok', import * as ui from 'datagrok-api/ui')まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Add support for a new curve data format in the Curves package converter system
日本語の概要は準備中です。原文の説明を表示しています。
Create info panels that appear in the context panel based on semantic types
日本語の概要は準備中です。原文の説明を表示しています。
Add a new single-objective optimization algorithm to the sci-comp library. Use when the user asks to implement a new optimizer (e.g. gradient descent, BFGS, simulated annealing, differential evolution).
日本語の概要は準備中です。原文の説明を表示しています。
Add unit tests to a Datagrok package
日本語の概要は準備中です。原文の説明を表示しています。
Answer a "how do I …" question about the platform with a Gherkin scenario on @datagrok-libraries/bdd that is filmed into a how-to video (grok-bdd guide), so the answer is demonstrated, sent as a video plus numbered steps, and kept as a regression test
日本語の概要は準備中です。原文の説明を表示しています。
Translate hand-written Playwright specs (or any existing UI tests) into Gherkin features on @datagrok-libraries/bdd, then prove the features test what they claim by backward-matching them against the originals with independent reviewers, and fix the gaps in the core, the library and the features
日本語の概要は準備中です。原文の説明を表示しています。