antvis / G2Plot

:dango: An interactive and responsive charting library based on G2.
https://g2plot.antv.antgroup.com
MIT License
2.56k stars 607 forks source link

🐛 [BUG]条形图配置x轴y轴的title旋转不生效 #3718

Open Keithcaiqian opened 11 months ago

Keithcaiqian commented 11 months ago
import { Bar } from '@antv/g2plot';

const data = [
  { year: '1951 年', value: 38 },
  { year: '1952 年', value: 52 },
  { year: '1956 年', value: 61 },
  { year: '1957 年', value: 145 },
  { year: '1958 年', value: 48 },
];

const bar = new Bar('container', {
  data,
  xField: 'value',
  yField: 'year',
  seriesField: 'year',
  yAxis: {
    title: {
      text: 'yAxis',
      autoRotate: false,
      rotation: Math.PI / 2
    },
  },
  xAxis: {
    title: {
      text: 'xAxis',
      autoRotate: false,
      rotation: Math.PI
    },
  },
  legend: {
    position: 'top-left',
  },
});

bar.render();

现象:方向没有变化 image