简体   繁体   English

我想要高图中的x轴和y轴的网格线,但我不想要x轴值和y轴值

[英]I want gird lines of x-axis and y-axis in highcharts but i don't want x-axis value and y-axis value

https://jsfiddle.net/Kondaldurgam/7kLkh7ya/8/ https://jsfiddle.net/Kondaldurgam/7kLkh7ya/8/

i want show gridines only x and y axis but but i don't have any data of x and y axis its possible to showing without data 我想显示网格只有x和y轴,但我没有任何x和y轴的数据,它可以显示没有数据

$(function() {
Highcharts.chart('container', {

    chart: {
        type: 'bubble',
        plotBorderWidth: 1,
        zoomType: 'xyz'
    },
    legend: {
        enabled: false
    },
    credits: {
        enabled: false
    },

    title: {
        text: 'Using X Y Z Coordinates'
    },

    xAxis: {
        type: "category",
        gridLineWidth: 1
    },
    yAxis: {
        startOnTick: false,
        endOnTick: true,

        title: {
            text: ''
        },
    },
 });
});

May be this will help you.. use this logic in it.. fiddler 可能这会帮助你..在它中使用这个逻辑.. fiddler

$(function () {
    var chart = new Highcharts.Chart({
        chart: {
            renderTo: 'container',
          ignoreHiddenSeries : false
        },

        xAxis: {
        },

        series: [{
            data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]        
        }, {
            data: [129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4]        
        }]
    });

    // the button action
  var series = chart.series[0];    
  series.hide();
  series = chart.series[1];    
  series.hide();
});

If you have no data, you need to set axis.showEmpty to true and set axis min/max. 如果没有数据,则需要将axis.showEmpty设置为true并设置轴min / max。 You also need at least one series - it might be without data. 您还需要至少一个系列 - 它可能没有数据。

    Highcharts.chart('container', {

    chart: {
        type: 'bubble',
        plotBorderWidth: 1,
        zoomType: 'xyz'
    },
    legend: {
        enabled: false
    },
    credits: {
        enabled: false
    },

    title: {
        text: 'Using X Y Z Coordinates'
    },

    xAxis: {
        type: "category",
        gridLineWidth: 1,
        showEmpty: true,
        min: 0,
        max: 10
    },
    yAxis: {
        startOnTick: false,
        endOnTick: true,
                    showEmpty: true,
        title: {
            text: ''
        },
        min: 0,
        max: 10
    },


    series: [{}]

});

example: https://jsfiddle.net/7kLkh7ya/9/ 示例: https//jsfiddle.net/7kLkh7ya/9/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我在x轴系列名称和y轴值名称中使用Highcharts感到麻烦,我不希望这两个名称吗? - I was trouble with Highcharts in x-axis series name and y-axis values name i don't want this two name's? X 轴上的时间和 Y 轴上带有超链接的值的图表 - Chart with time on X-axis and value on Y-axis with hyperlinks 我想在构建器和构建器中的x轴和y轴上创建一个可滚动的div - I want to make a scrollable div on x-axis and y-axis in a builder and in that builder x轴和y轴溢出 - x-axis and y-axis overflow 如何使用JavaScript设置ASP图表的X轴(或Y轴)值 - How can I set the x-axis (or y-axis) value of an asp chart using javascript 如何使用highcharts.js在x轴和y轴的末端获得箭头? - How can I get arrows at the end of x-axis and y-axis using highcharts.js? NVD3.js给定X轴值,获取所有线的Y轴值 - NVD3.js Given X-Axis Value, Get all Lines' Y-Axis Values 修复D3 JS的x轴并在y轴和x轴上添加虚线 - Fix the x-axis of D3 JS and add dotted lines to the y-axis and x-axis 我无法使用JChartFX在多个Y轴和日期X轴图表中显示任何内容 - I can't display anything in a Multiple Y-axis and Date X-axis chart with JChartFX 如何自定义 y 轴标签并从 Chart js 中 x 轴的数据范围中随机选取值 - How do I customize y-axis labels and randomly pick the value from the data range for x-axis in Chart js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM