Code Monkey home page Code Monkey logo

Comments (4)

AAChartModel avatar AAChartModel commented on June 18, 2024

使用 JavaScript 配置 Highcharts:

Highcharts.chart('container', {

    chart: {
        type: 'columnrange',
        inverted: true
    },

    title: {
        text: 'Temperature variation by month'
    },

    subtitle: {
        text: 'Observed in Vik i Sogn, Norway, 2021 | ' +
            'Source: <a href="https://www.vikjavev.no/ver/" target="_blank">Vikjavev</a>'
    },

    xAxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    },

    yAxis: {
        title: {
            text: 'Temperature ( °C )'
        }
    },

    tooltip: {
        valueSuffix: '°C'
    },

    plotOptions: {
        columnrange: {
            borderRadius: '50%',
            dataLabels: {
                enabled: true,
                format: '{y}°C'
            }
        },
        series: {
            minPointLength: 3
        }
    },
   

    legend: {
        enabled: false
    },

    series: [{
        name: 'Temperatures',
        data: [
            [-13.9, 5.2],
            [-16.7, 10.6],
            [0, 0],
            [-4.4, 16.8],
            [-2.1, 27.2],
            [5.9, 29.4],
            [6.5, 29.1],
            [4.7, 25.4],
            [4.3, 21.6],
            [-3.5, 15.1],
            [-9.8, 12.5],
            [-11.5, 8.4]
        ]
    }]

});

可以看到效果如下:
截屏2023-11-16 15 56 15

from aachartkit.

AAChartModel avatar AAChartModel commented on June 18, 2024

由图中显示的内容可以看出: 值为 [0, 0], 的地方, 仍有宽度为 3 的棱柱, 其中起作用的关键内容为:

plotOptions: {
        ...
        ...
        series: {
            minPointLength: 3 //柱状图, 条形图, 柱形范围图, 瀑布图, 箱线图(盒须图)直接设置单个图形元素的最小高度
        }
    },

 

你可以在这个在线编辑工具中测试此示例代码:

关键属性 minPointLength 请参考在线文档:

from aachartkit.

lgwResources avatar lgwResources commented on June 18, 2024

我用的AAChartKit-Pro ,因为需要用到AAChartTypeXrange,但是这里好像没有这个属性

from aachartkit.

lgwResources avatar lgwResources commented on June 18, 2024

我按照AAChartKitLib库中的AASeries和AAColumn中添加了minPointLength属性 可以显示出来了

from aachartkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.