react-apexcharts icon indicating copy to clipboard operation
react-apexcharts copied to clipboard

Not working 'React column-with-markers' chart

Open gyoogle opened this issue 4 years ago • 2 comments

https://apexcharts.com/react-chart-demos/column-charts/column-with-markers/

Hi, I want to use 'column-with-markers' chart However, the column works well, but the marker is not displayed on the chart. The same problem is occurring in the provided example code.

import React, { Component } from 'react';
import Chart from "react-apexcharts";

class ColumnChart extends Component {
    constructor(props) {
        super(props);

        this.state = {
          
            series: [
              {
                name: 'Actual',
                data: [
                  {
                    x: '2011',
                    y: 1292,
                    goals: [
                      {
                        name: 'Expected',
                        value: 1400,
                        strokeWidth: 5,
                        strokeColor: '#775DD0'
                      }
                    ]
                  },
                  {
                    x: '2012',
                    y: 4432,
                    goals: [
                      {
                        name: 'Expected',
                        value: 5400,
                        strokeWidth: 5,
                        strokeColor: '#775DD0'
                      }
                    ]
                  },
                  {
                    x: '2013',
                    y: 5423,
                    goals: [
                      {
                        name: 'Expected',
                        value: 5200,
                        strokeWidth: 5,
                        strokeColor: '#775DD0'
                      }
                    ]
                  },
                  {
                    x: '2014',
                    y: 6653,
                    goals: [
                      {
                        name: 'Expected',
                        value: 6500,
                        strokeWidth: 5,
                        strokeColor: '#775DD0'
                      }
                    ]
                  },
                  {
                    x: '2015',
                    y: 8133,
                    goals: [
                      {
                        name: 'Expected',
                        value: 6600,
                        strokeWidth: 5,
                        strokeColor: '#775DD0'
                      }
                    ]
                  },
                  {
                    x: '2016',
                    y: 7132,
                    goals: [
                      {
                        name: 'Expected',
                        value: 7500,
                        strokeWidth: 5,
                        strokeColor: '#775DD0'
                      }
                    ]
                  },
                  {
                    x: '2017',
                    y: 7332,
                    goals: [
                      {
                        name: 'Expected',
                        value: 8700,
                        strokeWidth: 5,
                        strokeColor: '#775DD0'
                      }
                    ]
                  },
                  {
                    x: '2018',
                    y: 6553,
                    goals: [
                      {
                        name: 'Expected',
                        value: 7300,
                        strokeWidth: 5,
                        strokeColor: '#775DD0'
                      }
                    ]
                  }
                ]
              }
            ],
            options: {
              chart: {
                height: 350,
                type: 'bar'
              },
              plotOptions: {
                bar: {
                  columnWidth: '60%'
                }
              },
              colors: ['#00E396'],
              dataLabels: {
                enabled: false
              },
              legend: {
                show: true,
                showForSingleSeries: true,
                customLegendItems: ['Actual', 'Expected'],
                markers: {
                  fillColors: ['#00E396', '#775DD0']
                }
              }
            },
          
          
          };
    }
    render() {
        return (
            <div>
                <div>
                    <Chart
                        options={this.state.options} series={this.state.series} type="bar" height={250}
                    />
                </div>

            </div>
        );
    }
}

export default ColumnChart;

gyoogle avatar Sep 28 '21 06:09 gyoogle

I have the same issue. the Expected markers do not appear

easyadin avatar Sep 28 '21 08:09 easyadin

same here

eliyahu-kriel avatar Jan 25 '22 20:01 eliyahu-kriel