javascript - 使用 Highcharts 修正图 TableView

标签 javascript charts highcharts

我希望您能帮助我解决我遇到的几个问题。

当我设置图片时,我遇到两个问题。

首先:我想知道如何抑制小时和分钟叶并仅保留工具提示日期。

第二:我想知道为什么下面的图表,它取0值,当它不需要留下任何东西时却留下红色标记。

谢谢,抱歉我的英语不好,我用的是谷歌翻译!

enter image description here

编辑:

代码:

var yAxis = [{
    labels: {
        align: 'right',
        x: -3
    },
    title: {
        text: 'Cierre'
    },
    type: 'logarithmic',
    height: '65%',
    lineWidth: 2,
    offset: 40
}, {
    labels: {
        align: 'right',
        x: -3
    },
    title: {
        text: 'RSC Mansfield'
    },
    top: '70%',
    height: '15%',
    offset: 40,
    lineWidth: 2
}, {
    labels: {
        align: 'right',
        x: -3
    },
    title: {
        text: 'Atlas'
    },
    top: '90%',
    height: '10%',
    offset: 40,
    lineWidth: 2
}];
var series = [{
    type: type,
    name: 'Data',
    id: 'price',
    data: scope.chart.data,
    color: '#000000',
    lineWidth: 2,
    dataGrouping: {
        enabled: false
    }
}, {
    type: 'coloredline',
    name: 'WMA 30',
    data: getWMA(scope.chart.wma),
    lineWidth: 1,
    dataGrouping: {
        enabled: false
    }
}, {
    type: 'flags',
    data: scope.chart.dividend,
    onSeries: 'price',
    color: '#E68A00'
}, {
    type: 'area',
    name: 'RSC Mansfield',
    data: scope.chart.mansfield,
    yAxis: 1,
    color: '#009900',
    fillColor: '#009900',
    negativeColor: '#CC0000',
    negativeFillColor: '#CC0000',
    fillOpacity: 0.5,
    dataGrouping: {
        enabled: false
    }
}, {
    type: 'column',
    name: 'Atlas',
    data: scope.chart.atlas,
    yAxis: 2,
    color: '#CC0000',
    dataGrouping: {
        enabled: false
    }
}];
$('.chart-container').highcharts('StockChart', {
    rangeSelector: {
        inputEnabled: $('.chart-container').width() > 480,
        selected: 4
    },
    title: {
        text: title
    },
    yAxis: yAxis,
    series: series,
    plotOptions: {
        series: {
            turboThreshold: 3000 //set it to a larger threshold, it is by default to 1000
        }
    }
});

最佳答案

  1. 工具提示问题 - 您可以使用:

a) tooltip.headerFormat

或者 b) tooltip.formatter

  • 列问题 - 设置 borderWidth: 1 将用边框覆盖该点。 演示:http://jsfiddle.net/Lzv9d4qs/
  • 这看起来像一个错误,所以我在这里报告了它 - https://github.com/highcharts/highcharts/issues/5146

    关于javascript - 使用 Highcharts 修正图 TableView ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36165495/

    相关文章:

    javascript - TypeScript 为 HTMLCollectionOf<Element>、NodeCollection<Element>、google 自动完成表单设置 css 样式

    javascript - 从meteor中的JSONP中提取数据

    javascript - JS : how do I concatenate a variable into a API call with the dot syntax?

    javascript - 我正在尝试使用脚本在 HTML 中创建一个 8x8 正方形的表格

    javascript - 将 mp3 片段从、到并应用淡入、淡出

    javascript - 如何从用户处获取自定义弹出窗口的宽度和高度?

    android - 具有空值的 MPAndroidChart

    javascript - d3.js 的饼图转换图中的输入数据不显示标签名称

    c# - 如何在图表控件中隐藏系列名称

    R - 传单 - highcharter 工具提示(标签)