如何去除图表的水平线及其角度轴线?

rea*_*rav 11 apexcharts

以下是一个有角度的应用程序,其中的图表由顶点图表组成

https://codesandbox.io/s/apx-column-distributed-d3ns7?from-embed

如何删除该图表及其轴线的水平线(这样看起来更干净)

    this.chartOptions = {
      series: [
        {
          name: "distibuted",
          data: [21, 22,]
        }
      ],
      chart: {
        height: 350,
        type: "bar",
        events: {
          click: function(chart, w, e) {
            // console.log(chart, w, e)
          }
        }
      },
      colors: [
        "#008FFB",
        "#00E396",
      ],
      plotOptions: {
        bar: {
          columnWidth: "45%",
          distributed: true
        }
      },
      dataLabels: {
        enabled: false
      },
      legend: {
        show: false
      },
      xaxis: {
        categories: [
          ["John", "Doe"],
          ["Joe", "Smith"],
        ],
        labels: {
          style: {
            colors: [
              "#008FFB",
              "#00E396",
            ],
            fontSize: "12px"
          }
        }
      }
    };
Run Code Online (Sandbox Code Playgroud)

还有如何设置工具提示颜色的格式?

Ntw*_*ste 17

现在您可以使用此选项

chartOptions: {
    chart: {
      id: "basic-bar",
    },
    grid: {
      show: true,      // you can either change hear to disable all grids
      xaxis: {
        lines: {
          show: true  //or just here to disable only x axis grids
         }
       },  
      yaxis: {
        lines: { 
          show: true  //or just here to disable only y axis
         }
       },   
    },
  }
Run Code Online (Sandbox Code Playgroud)

有关更多详细信息,您可以使用此参考


jun*_*ipa 6

可以使用以下方式隐藏网格线。

grid: {
    show: false
}
Run Code Online (Sandbox Code Playgroud)

或者

grid: {
    show: false
}
Run Code Online (Sandbox Code Playgroud)

编辑:在你的例子中,你失踪了

  <apx-chart
    [grid]="chartOptions.grid"
  ></apx-chart>
Run Code Online (Sandbox Code Playgroud)


ale*_*mur 3

在您的配置中添加 axisBorder 和 axisTicks 配置,但我找不到如何完全删除水平条。如果我找到了,我会回来的。

xaxis
  categories: [
    ["John", "Doe"],
    ["Joe", "Smith"],
  ],
  axisBorder: {
    show: false
  },
  axisTicks: {
    show: false,
  },
Run Code Online (Sandbox Code Playgroud)