高亮轴标签

时间:2018-02-04 20:29:59

标签: reactjs highcharts react-highcharts

我希望在高图轴标签中使用反应组件。我已经尝试了许多不同的方法来实现这一目标但没有成功。

我现在就在这里:

import React from 'react'
import ReactHighcharts from 'react-highcharts

import MyOtherReactComponent from '...'

export const MyReactChart = () => (
  <ReactHighcharts config={{
    ...
    xAxis: [{
      categories: ['Item 1', 'Item 2'],
      labels: {useHTML: true, formatter: function() {
        return this.value + <MyOtherReactComponent  options={options} />
      }}
    }, {// Secondary xAxis}]
  }}
)

我一直得到以下内容:

Item 1 [Object, Object]
Item 2 [Object, Object]

有人能告诉我如何才能做到这一点吗?

非常感激和欢呼!

0 个答案:

没有答案
相关问题