LQF_Machine_Learning_E…
LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine learning, modeling,…
Expert skill for G2 legend development - provides comprehensive knowledge about legend rendering implementation, component architecture, layout algorithms, and interaction handling. Use when implementing, customizing, or debugging legend functionality in G2 visualizations.
$ npx -y skills add foryourhealth111-pixel/Vibe-Skills --skill g2-legend-expert --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/g2-legend-expertContext preview
The summary Claude sees to decide when to auto-load this skill.
Expert skill for G2 legend development - provides comprehensive knowledge about legend rendering implementation, component architecture, layout algorithms, and interaction handling. Use when implementing, customizing, or debugging legend functionality in G2 visualizations.
name: G2 Legend Expert description: Expert skill for G2 legend development - provides comprehensive knowledge about legend rendering implementation, component architecture, layout algorithms, and interaction handling. Use when implementing, customizing, or debugging legend functionality in G2 visualizations.
This skill provides comprehensive knowledge about legend rendering in G2, covering the complete legend rendering flow from component creation to layout calculation and interaction handling.
The legend rendering flow in G2 follows a multi-stage process that transforms legend configuration into visual components. This flow involves several key stages:
Legend components are inferred from the chart's scales and configuration during the initial setup phase. The inference process is handled by the `inferComponent` function in `src/runtime/component.ts`:
Two main legend component types are implemented:
Located in `src/component/legendCategory.ts`, this component handles categorical legends:
Located in `src/component/legendContinuous.ts`, this handles continuous legends:
The layout process is managed in `src/runtime/layout.ts` and involves several critical steps:
The `computeComponentSize` function handles sizing based on component type:
The core layout logic is in the `computePadding` function:
const autoSizeOf = (d) => {
if (d.size) return;
if (value !== 'auto') sizeOf(d);
else {
// Compute component size dynamically
computeComponentSize(
d,
crossSize,
crossPadding,
position,
theme,
library,
);
defaultSizeOf(d);
}
};The `renderComponent` function in `src/runtime/component.ts` handles the actual rendering:
After size calculation, the `placeComponents` function assigns bounding boxes:
Categorical legends (LegendCategory) are used for discrete scales and support:
Continuous legends (LegendContinuous) handle continuous scales:
The legend filtering interaction is implemented in `src/interaction/legendFilter.ts`:
Legends support multiple visual states:
Legend components integrate with G2's themin
Intelligent Skill routing and workflow orchestration for AI agents — +21.12 pp reward, −29.6% tokens on SkillsBench with DeepSeekV4Flash-VE.
Repo: foryourhealth111-pixel/Vibe-Skills
LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine learning, modeling,…
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection,…
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code,…
Access real-time and historical stock market data, forex rates, cryptocurrency prices, commodities, economic indicators, and 50+ technical indicators via the…
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex…