Comments (4)
@kennetpostigo
I think you should set the cx
, cy
, innerRadius
, outerRadius
of RadarChart
and RadialBarChart
to be a percent value.
<ResponsiveContainer width='100%' height='100%'>
<AreaChart className="area" data={data}
margin={{top: 10, right: 30, left: 0, bottom: 0}}>
<XAxis dataKey="name"/>
<YAxis/>
<CartesianGrid strokeDasharray="3 3"/>
<Tooltip/>
<Area type='monotone' dataKey='uv' stackId="1" stroke='#8884d8' fill='#8884d8' />
<Area type='monotone' dataKey='pv' stackId="1" stroke='#82ca9d' fill='#82ca9d' />
<Area type='monotone' dataKey='amt' stackId="1" stroke='#ffc658' fill='#ffc658' />
</AreaChart>
</ResponsiveContainer>
<ResponsiveContainer width='100%' height='100%'>
<RadialBarChart className="radial" cx="50%" cy="70%" innerRadius="20%" outerRadius="80%" data={data2}>
<RadialBar minAngle={15} label background clockWise={true} dataKey='uv'/>
<Legend iconSize={10} width={90} height={140} layout='vertical' verticalAlign='middle' wrapperStyle={style}/>
</RadialBarChart>
</ResponsiveContainer>
<ResponsiveContainer width='100%' height='100%'>
<RadarChart className="radar" cx="50%" cy="50%" outerRadius="80%" data={data3}>
<Radar name="Mike" dataKey="A" stroke="#8884d8" fill="#8884d8" fillOpacity={0.6}/>
<Radar name="Lily" dataKey="B" stroke="#82ca9d" fill="#82ca9d" fillOpacity={0.6}/>
<PolarGrid />
<Legend />
<PolarAngleAxis dataKey="subject" />
<PolarRadiusAxis angle={30} domain={[0, 150]}/>
</RadarChart>
</ResponsiveContainer>
</div>
You can see the demo.
from recharts.
@kennetpostigo can you show some code?
from recharts.
I have the following:
<div className="DashCharts">
<ResponsiveContainer width='100%' height='100%'>
<AreaChart className="area" data={data}
margin={{top: 10, right: 30, left: 0, bottom: 0}}>
<XAxis dataKey="name"/>
<YAxis/>
<CartesianGrid strokeDasharray="3 3"/>
<Tooltip/>
<Area type='monotone' dataKey='uv' stackId="1" stroke='#8884d8' fill='#8884d8' />
<Area type='monotone' dataKey='pv' stackId="1" stroke='#82ca9d' fill='#82ca9d' />
<Area type='monotone' dataKey='amt' stackId="1" stroke='#ffc658' fill='#ffc658' />
</AreaChart>
</ResponsiveContainer>
<ResponsiveContainer width='100%' height='100%'>
<RadialBarChart className="radial" cx={150} cy={150} innerRadius={20} outerRadius={140} barSize={10} data={data2}>
<RadialBar minAngle={15} label background clockWise={true} dataKey='uv'/>
<Legend iconSize={10} width={90} height={140} layout='vertical' verticalAlign='middle' wrapperStyle={style}/>
</RadialBarChart>
</ResponsiveContainer>
<ResponsiveContainer width='100%' height='100%'>
<RadarChart className="radar" cx={300} cy={250} outerRadius={90} data={data3}>
<Radar name="Mike" dataKey="A" stroke="#8884d8" fill="#8884d8" fillOpacity={0.6}/>
<Radar name="Lily" dataKey="B" stroke="#82ca9d" fill="#82ca9d" fillOpacity={0.6}/>
<PolarGrid />
<Legend />
<PolarAngleAxis dataKey="subject" />
<PolarRadiusAxis angle={30} domain={[0, 150]}/>
</RadarChart>
</ResponsiveContainer>
</div>
from recharts.
Okay thank you!
from recharts.
Related Issues (20)
- Tooltip deprecation HOT 1
- Negative interval number HOT 5
- Getting lowest and highest possible x and y in a line chart? HOT 22
- Tooltip first render HOT 7
- YAxis is missing if value = null || undefined HOT 2
- different name on tooltip from xaxis on barchart HOT 4
- Better API documentation HOT 3
- Issues with typing Legend props HOT 7
- Stacking Xaxis dataKey text HOT 3
- AreaChart and LineChart do not show the values correctly HOT 1
- Question on exporting `useChartWidth` and similar api HOT 2
- BarChart : Without BarSize bug, with BarSize another Bug HOT 2
- Adjust the colour of the dot at the cursor of the tooltip (AreaChart) HOT 3
- Lines directly on the lower or upper bound of a Y-axis with custom domain and allowDataOverflow gets partially clipped out of view HOT 4
- Active bar and tooltip persist despite mouse cursor leaving chart area HOT 4
- Is there any way to position=insideMiddle? HOT 5
- Brush component is missing property `data` HOT 3
- Stacked chart round some bars HOT 2
- Points property not generating for Area Chart in v2.12.6 HOT 5
- recharts responsive pie chart with legend HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recharts.