调整饼图
This commit is contained in:
parent
0e5eeac7d4
commit
d91543ea5e
@ -130,7 +130,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: "group",
|
type: "group",
|
||||||
top: 60,
|
top: 60,
|
||||||
left: 10,
|
left: 8,
|
||||||
silent: true,
|
silent: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
@ -156,7 +156,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: "group",
|
type: "group",
|
||||||
top: 36,
|
top: 36,
|
||||||
right: 10,
|
right: 0,
|
||||||
silent: true,
|
silent: true,
|
||||||
children: source.map((item, idx) => {
|
children: source.map((item, idx) => {
|
||||||
const data =
|
const data =
|
||||||
@ -170,7 +170,7 @@ export default {
|
|||||||
style: {
|
style: {
|
||||||
text: `${item[0]}:${data.toFixed(1)}${
|
text: `${item[0]}:${data.toFixed(1)}${
|
||||||
this.type === "calories" ? "千卡" : "克"
|
this.type === "calories" ? "千卡" : "克"
|
||||||
}`,
|
}${` (${((item[1] / total) * 100).toFixed(1)}%`})`,
|
||||||
fill: "#606266",
|
fill: "#606266",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -181,7 +181,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: "pie",
|
type: "pie",
|
||||||
radius: [0, 60],
|
radius: [0, 60],
|
||||||
center: ["50%", "55%"],
|
center: ["42%", "55%"],
|
||||||
// labelLine: {
|
// labelLine: {
|
||||||
// length: 5,
|
// length: 5,
|
||||||
// length2: 5,
|
// length2: 5,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user