Skip to content

some question about line mark #2342

Closed
Closed

Description

@cncxt

my data structure like this:
[ {2024-01-01,2024,10796},
{2024-01-02,2024,11403},
.......
{2024-12-31,2024,13072},
{2025-01-01,2025,13137},
{2025-01-02,2025,15366},
.....
{2025-06-27,2025,11383},
{2025-06-28,2025,10644}]

my code is:
${resize((width)=>
Plot.plot({
width,
marginRight:40,
marks:[
Plot.ruleY([0]),
Plot.lineY(data, {x: {value: "date"},
y: "cost",stroke:"year"})
],
x:{type:"time",
tickformat:"%b",
ticks:"month",
grid:true
},
y:{insetTop:40,label:"单位:元"}
}))}

after runing ,my chart is:

Image

but i want it like this:

Image

and I am a beginner, and I have many similar questions like this. Where should I go to discuss these issues?
thank you very much

Activity

  1. locked and limited conversation to collaborators on Sep 16, 2025
  2. converted this issue into a discussion #2343 on Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions