agentleFS
Evan-Kim2028Evan-Kim2028/agent-skills/skills/frontend/mobile-app-echarts-visual/SKILL.md

mobile-app-echarts-visual

Skill1 starsChanged 3 months agoMITView on GitHub

Mobile-readable **product ECharts** (card price/volume, portfolio history, set charts) without desktop regressions — grid gutters, axisLabel floors, legend placement, adaptive height, touch tooltips, dual-viewport proof. Use when card or portfolio charts are clipped, tiny, sparse, legend-jammed, "mobile echarts", or /mobile-app-echarts-visual. Prefer mobile-blog-chart-visual for blog SVG. Prefer design-system chart tokens + tufte for honesty.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer containLabel: true on card/portfolio series charts unless a fixed grid is proven.

    line 46
  2. Distinctive:

    Do not use blog SVG viewBox math here — ECharts sizes in CSS pixels after layout.

    line 56
  3. Very specific:

    Use resolveAdaptiveChartHeight (or equivalent):

    line 60
  4. Distinctive:

    Leave room for sticky chrome (card: app + command + tabs + bottom nav).

    line 66
  5. Very specific:

    Always go through chartTheme / marketplace color maps — no one-off hex in options.

    line 78
  6. Distinctive:

    No subtitle line under the page title restating the axis.

    line 86
  7. Distinctive:

    Run card ECharts mobile e2e + manual 390 screenshot.

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Mobile app ECharts visual

Job: Product charts (canvas ECharts) stay legible at ~390×844 and coherent at desktop widths. Mobile is primary for SilphCo; desktop must not gain poster labels or empty plots from mobile-only hacks.

Scope: frontend/src/charts/**, card-detail price/volume, portfolio valuation history, set volume charts. Not blog SVG — use mobile-blog-chart-visual.

Sources

SourceWhat we take
Nadieh Bremer — Mobile vs desktop datavizNon-linear type; stack/simplify on small screens; different chart when needed
Tableau mobile dashboard designSimple views, fewer filters, high-level marks
Create with Swift — humanist mobile datavizNo hover-only UX; high contrast; color-independent cues
Apache ECharts docs (grid / axisLabel / containLabel)grid + containLabel + resize rebuild — not CSS font hacks on canvas
Silph chartTheme + adaptiveChartHeightToken colors; mobile height ≥ desktop for dense series

Core rules (ECharts)

Grid (gutters)

At mobile container width (~350–370 CSS px after padding):

RegionFloor (CSS px)Notes
grid.left≥ 44Room for y labels (or use containLabel: true)
grid.right≥ 12 (more if right-side series labels)
grid.top≥ 28 if legend/title; else ≥ 12Prefer no chart title if page already has one
grid.bottom≥ 36x labels + dataZoom

Prefer containLabel: true on card/portfolio series charts unless a fixed grid is proven.

Type floors (CSS px, ECharts fontSize)

RoleMobile minDesktop soft max
axisLabel1114
legend1113
tooltip1214

Do not use blog SVG viewBox math here — ECharts sizes in CSS pixels after layout.

Height

Use resolveAdaptiveChartHeight (or equivalent):

  • Sparse series: compact (~180)
  • Mobile dense: ≥ 280
  • Desktop dense: ~260

Leave room for sticky chrome (card: app + command + tabs + bottom nav). Chart viewport ≈ remaining space after chrome — do not force a 400px chart under a 160px sticky stack without scroll.

Interaction

  • Touch: use project touchTooltip / axisPointer patterns — no hover-only insight.
  • DataZoom: show a mobile hint once if pinch/pan is required.
  • Legend: bottom or scrollable; never overflow the container width.

Color

  • Always go through chartTheme / marketplace color maps — no one-off hex in options.
  • Dark + light modes both pass contrast against chartSurface.
  • Color-independent series cues (line type / marker) for critical series when possible.

Title hygiene

  • Page/section heading owns the title.
  • No ECharts title text that duplicates the section heading (wastes top grid).
  • No subtitle line under the page title restating the axis.

Verification (product)

#CheckPass
E1axisLabel fontSize ≥ 11 at 390
E2grid gutters / containLabel — labels fully inside chart DOM box
E3No horizontal document overflow
E4Canvas width ≥ ~300 on 390 viewport for primary chart
E5Legend not clipped
E6Dual viewport 390 + 1280 — no desktop poster fonts
E7e2e: card-echarts-mobile-geometry (or successor) green

Workflow

  1. Identify option builder (e.g. PriceOverTime, DailyVolume, portfolio history).
  2. Set grid + axisLabel + legend for mobile first.
  3. Wire adaptiveChartHeight(isMobile).
  4. Confirm theme tokens.
  5. Run card ECharts mobile e2e + manual 390 screenshot.
  6. Desktop smoke: same option path at ≥1280.

Anti-patterns

  • Copying blog SVG floor math into ECharts options.
  • grid.left: '2%' with long grade labels → clip.
  • Desktop-only legend on the right → mobile overflow.
  • Functional e2e green with unreadable axis (must geometry-probe).
  • Fixing clip with overflow:hidden on the chart shell.

Hand off

NeedSkill
Blog SVGmobile-blog-chart-visual
Tokensdesign-system
Sticky chromeproduct-chrome-craft
Viz honestytufte
e2e proofbrowser-verify

Done criteria

  • E1–E7 for touched product charts
  • No title/subtitle duplicate under section heading
  • Live card mobile screenshot: labels inside canvas box

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.