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

Draw a circle with center as given coordinate points (x,y) and given radius using echarts. #382

Open
stuti24sinha opened this issue Dec 21, 2022 · 0 comments

Comments

@stuti24sinha
Copy link

Problem Statement : I want to plot a circle with a center as (cx,cy) and a given radius.

Below is the code:

option = {
xAxis: {
type: 'value',
min: 50,
max: 500,
interval: 100
},
yAxis: {
type: 'value',
min: 50,
max: 500,
interval: 100
},
graphic: [
{
elements: [
{
id: 'small_circle',
type: 'circle',
z: 100,
shape: {
// x coordinate for center
cx: 150 ,
// y coordinate for center
cy: 350 ,
// radius
r: 50,
},
style: {
fill: 'rgba(0, 140, 250, 0.5)',
stroke: 'rgba(0, 50, 150, 0.5)',
lineWidth: 2
}
}
]
}
],
};

Issue : The circle rendered does not have the center (cx,cy).
line-simple (1)

Can you help me on how to provide the values for center using options ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant