You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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}]
This discussion was converted from issue #2342 on September 16, 2025 15:42.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
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:
but i want it like this:
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
Beta Was this translation helpful? Give feedback.
All reactions