Skip to content

Commit c91cac7

Browse files
authored
fix: fix line point color style (#174)
1 parent 54887f2 commit c91cac7

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

bindings/gpt-vis-ssr/__tests__/line.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ describe('SSR render', () => {
103103
group: true,
104104
axisXTitle: 'Month',
105105
axisYTitle: 'Temperature',
106+
style: {
107+
backgroundColor: '#aaa',
108+
lineWidth: 4,
109+
palette: PALETTE,
110+
},
106111
});
107112

108113
expect(vis.toBuffer()).toImageEqual('__tests__/snapshot', 'line-grouped');
4.43 KB
Loading

bindings/gpt-vis-ssr/src/vis/line.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ export async function Line(options: LineOptions) {
9898
shape: 'point',
9999
...(lineWidth ? { size: lineWidth * 1.2 } : {}),
100100
},
101-
style: { fill: 'white', lineWidth: 1, ...(hasPalette ? { stroke: palette[0] } : {}) },
101+
style: {
102+
fill: 'white',
103+
lineWidth: 1,
104+
...(hasPalette && !hasGroupField ? { stroke: palette[0] } : {}),
105+
},
102106
},
103107
],
104108
scale: {

0 commit comments

Comments
 (0)