首页 > 解决方案 > apexcharts somtimes 漂浮在容器上,当我调整窗口大小时它会修复

问题描述

我不认为我有太多细节,
当我打开页面时你可以在这里看到: 在此处输入图像描述

这是正常的(当我只调整一点时): 在此处输入图像描述

email views

chart: {
    id: "emailViewsStat",
    group: "emailStat",
    type: "area",
    height: 70,
    sparkline: {
      enabled: true,
    },
  },
  stroke: {
    curve: "smooth",

    colors: undefined,
    width: 3,
  },
  colors: ["#E5C267"],
  fill: {
    type: "gradient",
    gradient: {
      shade: gradientShade,
      opacityFrom: 0.2,
      opacityTo: 0.5,
      stops: [0, 90, 100],
      type: "horizontal",
      gradientToColors: undefined, // optional, if not defined - uses the shades of same color in series
      inverseColors: true,
      colorStops: [],
    },
  },
  series: [
    {
      data: randomizeArray(sparklineData),
    },
  ],
  labels: [...Array(24).keys()].map((n) => `2018-09-0${n + 1}`),
  yaxis: {
    min: 0,
  },
  labels: [...Array(24).keys()].map((n) => `2018-09-0${n + 1}`),
  xaxis: {
    type: "datetime",
  },

email clicks

chart: {
    id: "emailClickStat",
    group: "emailStat",
    type: "area",
    height: 70,
    sparkline: {
      enabled: true,
    },
  },
  stroke: {
    curve: "smooth",
    colors: undefined,
    width: 3,
  },
  colors: ["#E5C267"],
  fill: {
    type: "gradient",
    gradient: {
      shade: gradientShade,
      opacityFrom: 0.2,
      opacityTo: 0.5,
      stops: [0, 90, 100],
      type: "horizontal",
      gradientToColors: undefined, // optional, if not defined - uses the shades of same color in series
      inverseColors: true,
      colorStops: [],
    },
  },
  series: [
    {
      name: "Expenses",
      data: randomizeArray(sparklineData),
    },
  ],
  labels: [...Array(24).keys()].map((n) => `2018-09-0${n + 1}`),
  yaxis: {
    min: 0,
  },
  xaxis: {
    type: "datetime",
  },
  colors: ["#E5C267"],

CTR

chart: {
    type: "bar",
    height: 100,
    sparkline: { enabled: !0 },
    toolbar: { show: !1 },
  },
  states: { hover: { filter: "none" } },
  colors: [a, a, p, a, a, a],
  series: [{ name: "Sessions", data: [75, 125, 5, 175, 125, 75, 25] }],
  grid: { show: !1, padding: { left: 0, right: 0 } },
  plotOptions: {
    bar: { columnWidth: "35%", distributed: !0, endingShape: "rounded" },
  },
  tooltip: { x: { show: !1 } },
  xaxis: { type: "numeric" },

我希望在不调整大小的情况下优化图表。

谢谢。

只是一些细节:细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节细节

标签: javascriptchartsapexcharts

解决方案


推荐阅读