Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update Scatter Chart Legend #260

Merged
merged 7 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions stories/molecules/card-line-chart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ const storyConfig = {
export default storyConfig;

const testOptions = {
grid: {
left: 40,
top: 10,
right: 40,
bottom: 20
},
eryc-cc marked this conversation as resolved.
Show resolved Hide resolved
xAxis: {
type: "category",
boundaryGap: false,
Expand Down
78 changes: 74 additions & 4 deletions stories/molecules/scatter-chart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,43 @@ const storyConfig = {
export default storyConfig;

const testOptions = {
xAxis: {},
yAxis: {},
grid: {
left: 40,
top: 10,
right: 40,
bottom: 20
},
xAxis: {
boundaryGap: false,
scale: true,
minInterval: 7,
maxInterval: 7,
min: 0,
max: 35,
axisLabel: {
formatter: (value: number, index: number) => value === 0 ? "Today" : value === 35 ? "35+ days ago" : `${value} days ago`
},
splitLine: {
lineStyle: {
type: "dashed"
}
}
},
yAxis: {
min: 0,
max: 100,
splitNumber: 2,
boundaryGap: false,
axisLabel: {
showMinLabel: false,
formatter: "{value}%"
},
splitLine: {
lineStyle: {
type: "dashed"
}
}
},
series: [
{
symbolSize: 20,
Expand Down Expand Up @@ -45,8 +80,43 @@ const testOptions = {
};

const testOptionsWithImage = {
xAxis: {},
yAxis: {},
grid: {
left: 40,
top: 10,
right: 40,
bottom: 20
},
xAxis: {
boundaryGap: false,
scale: true,
minInterval: 7,
maxInterval: 7,
min: 0,
max: 35,
axisLabel: {
formatter: (value: number, index: number) => value === 0 ? "Today" : value === 35 ? "35+ days ago" : `${value} days ago`
},
splitLine: {
lineStyle: {
type: "dashed"
}
}
},
yAxis: {
min: 0,
max: 100,
splitNumber: 2,
boundaryGap: false,
axisLabel: {
showMinLabel: false,
formatter: "{value}%"
},
splitLine: {
lineStyle: {
type: "dashed"
}
}
},
series: [
{
symbolSize: 30,
Expand Down