Как изменить ширину линии полигона области в старшей диаграмме? - PullRequest
0 голосов
/ 06 ноября 2019

Я хотел бы внести изменения (цвет, ширина) в это:

enter image description here

Highcharts.chart('container', {
    title: {
      text: null
    },
    legend: {
      enabled: false
    },
    tooltip: {
      pointFormat: '{point.y}'
    },
    pane: {
      size: '95%'
    },
    chart: {
      type: 'area',
      polar: true,
      spacingTop: 0
    },
    credits: {
      enabled: false
    },
    xAxis: {
      categories: ["John","Weta","Marry"],
      tickmarkPlacement: 'on',
      lineWidth: 2,
      labels: {
        style: {
          fontSize: window.screenshotMode ? '36px' : '18px'
        }
      }
    },
    yAxis: {
      gridLineInterpolation: 'polygon',
      lineWidth: 2,
      min: 0,
      max: 100,
      labels: {
        style: {
          fontSize: window.screenshotMode ? '36px' : '18px'
        }
      }
    },
    plotOptions: {
      series: {
        borderWidth: 4,
        borderColor: '#a00'
      }
    },
    series: [{
      data: [68,97,964]
    }]
  })
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>

<div id="container" style="height: 400px"></div>

Ответы [ 2 ]

2 голосов
/ 06 ноября 2019

Используйте lineWidth вместо borderWidth свойство:

plotOptions: {
    series: {
        lineWidth: 4,
        ...
    }
}

Демонстрационная версия: http://jsfiddle.net/BlackLabel/evsh4oL9/

Ссылка API: https://api.highcharts.com/highcharts/series.polygon.lineWidth

1 голос
/ 06 ноября 2019

Вы можете использовать

plotOptions: {
        series: {
            lineWidth: 5,
            lineColor: '#a00'
        }
    }

Highcharts.chart('container', {
    title: {
      text: null
    },
    legend: {
      enabled: false
    },
    tooltip: {
      pointFormat: '{point.y}'
    },
    pane: {
      size: '95%'
    },
    chart: {
      type: 'area',
      polar: true,
      spacingTop: 0
    },
    credits: {
      enabled: false
    },
    xAxis: {
      categories: ["John","Weta","Marry"],
      tickmarkPlacement: 'on',
      lineWidth: 2,
      labels: {
        style: {
          fontSize: window.screenshotMode ? '36px' : '18px'
        }
      }
    },
    yAxis: {
      gridLineInterpolation: 'polygon',
      lineWidth: 2,
      min: 0,
      max: 100,
      labels: {
        style: {
          fontSize: window.screenshotMode ? '36px' : '18px'
        }
      }
    },
    plotOptions: {
      series: {
        borderWidth: 4,
        lineWidth: 10,
        lineColor: '#a00',
        borderColor: '#a00'
      }
    },
    series: [{
      data: [68,97,964]
    }]
  })
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>

<div id="container" style="height: 400px"></div>

Ссылки API : https://api.highcharts.com/highcharts/plotOptions.series.lineWidth

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...