highcharts图形不显示yaxis值

highcharts图形不显示yaxis值,highcharts,Highcharts,该图不显示y轴值​​. 有人能帮我吗?谢谢 如果我在序列数据中输入prueba的值,则一切正常 prueba阵列和dinero阵列显示正确 谢谢 $.getJSON('http://localhost/jquery/grafica4.php', function(data) { var dinero = []; var categories = []; var prueba = [79, 71, 66,44,42,38,32,10]; $.each(data

该图不显示y轴值​​. 有人能帮我吗?谢谢

如果我在序列数据中输入
prueba
的值,则一切正常
prueba
阵列和
dinero
阵列显示正确

谢谢

$.getJSON('http://localhost/jquery/grafica4.php', function(data) {

    var dinero = [];
    var categories = [];
    var prueba = [79, 71, 66,44,42,38,32,10];

    $.each(data, function(index, value) {
        categories.push(data[index].producto_id);
        dinero.push(data[index].cantidad);
        alert("hola");
    });
    alert(dinero);
    alert(prueba);

    chart4 = new Highcharts.Chart({
        chart: {
            renderTo: 'container3',
            type: 'column'
        },
        title: {
            text: 'Productos más vendidos'
        },
        xAxis: {
            categories: categories
        },
        yAxis: {
            min: 0,
            title:
            text: 'Cantidad'
        },
        labels: {
            formatter: function() {
                return this.value; // clean, unformatted
            }
        }
    },
    legend: {
        layout: 'vertical',
        backgroundColor: '#FFFFFF',
        align: 'left',
        verticalAlign: 'top',
        x: 100,
        y: 70,
        floating: true,
        shadow: true
    },
    tooltip: {
        formatter: function() {
            return ''+
            '<b>'+'Producto:'+this.x +'</b>'+'<br/>'+ this.y+ ' unidades';
        }
    },
    plotOptions: {
        column: {
            pointPadding: 0.3,
            borderWidth: 0
        }
    },
    series: [{
        name: 'Cantidad',
        data: dinero
    }],
    exporting: {
        filename: 'Facturacion-de-empleados'
    }
});
});
$.getJSON('http://localhost/jquery/grafica4.php,函数(数据){
var dinero=[];
var类别=[];
var prueba=[79,71,66,44,42,38,32,10];
$.each(数据、函数(索引、值){
categories.push(数据[索引].producto_id);
push(数据[index].cantidad);
警报(“hola”);
});
警觉(迪内罗);
警惕(普鲁巴);
图表4=新的高点图表。图表({
图表:{
renderTo:'container3',
类型:“列”
},
标题:{
文本:“产品más vendidos”
},
xAxis:{
类别:类别
},
亚克斯:{
分:0,,
标题:
文本:“Cantidad”
},
标签:{
格式化程序:函数(){
返回this.value;//干净,未格式化
}
}
},
图例:{
布局:“垂直”,
背景颜色:“#FFFFFF”,
对齐:“左”,
垂直排列:“顶部”,
x:100,
y:70,
浮动:是的,
影子:对
},
工具提示:{
格式化程序:函数(){
返回“”+
'+'Producto:'+this.x+'+'
'+this.y+'unidades'; } }, 打印选项:{ 专栏:{ 点填充:0.3, 边框宽度:0 } }, 系列:[{ 名称:'Cantidad', 资料来源:迪内罗 }], 出口:{ 文件名:'Facturacion de Employados' } }); });
您能记录并向我们显示您的json结果吗?我有结果问题。问题是在返回json时强制转换(int)值。谢谢如果你认为你回答了这个问题,一定要创造一个答案,并标记为这样。