Skip to content

feat: add sheets chart subcommand (create, list, update, delete) #432

@andybergon

Description

@andybergon

Summary

Chart CRUD is missing from gog sheets. Currently managing charts requires manually exchanging tokens and crafting batchUpdate JSON payloads via curl.

Proposed subcommands

Command API Description
sheets chart list <id> spreadsheets.get (fields=sheets.charts) List charts (ID, title, type, sheet)
sheets chart delete <id> <chartId> batchUpdatedeleteEmbeddedObject Delete a chart
sheets chart create <id> --spec-json '{...}' batchUpdateaddChart Create chart from raw spec JSON
sheets chart update <id> <chartId> --spec-json '{...}' batchUpdateupdateChartSpec Update chart spec

A --spec-json passthrough for the EmbeddedChartSpec keeps the initial scope small while covering all chart types. Ergonomic flags (--type, --series, --reversed, etc.) could come later.

Additional flags for create: --sheet (resolved to sheetId via metadata), --anchor (e.g. A72), --width, --height

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions