GVKun编程网logo

javascript – Highcharts规范不渲染文本(javascript数据渲染)

14

这篇文章主要围绕javascript–Highcharts规范不渲染文本和javascript数据渲染展开,旨在为您提供一份详细的参考资料。我们将全面介绍javascript–Highcharts规范

这篇文章主要围绕javascript – Highcharts规范不渲染文本javascript数据渲染展开,旨在为您提供一份详细的参考资料。我们将全面介绍javascript – Highcharts规范不渲染文本的优缺点,解答javascript数据渲染的相关问题,同时也会为您带来Highcharts 2.1.7 发布,纯Javascript图表、Highcharts 2.2.5 发布,纯Javascript图表库、Highcharts 2.3.3 发布,纯Javascript图表库、Highcharts 5.0.10 发布,纯 Javascript 图表库的实用方法。

本文目录一览:

javascript – Highcharts规范不渲染文本(javascript数据渲染)

javascript – Highcharts规范不渲染文本(javascript数据渲染)

我正在尝试使用Highcharts创建一个仪表.

在仪表中我想要在针尖处渲染文本,并且当针尖位置改变时文本的位置应该改变.我已经在仪表的开始位置和结束位置添加了一些文本,我需要根据针尖添加第三个文本.

你能看看,让我知道我是怎么做到的吗?

我的jsfiddle链接是http://jsfiddle.net/anchika/nszqbsgx/1/

var chart = new Highcharts.Chart({
    chart: {
        type: 'gauge',renderTo: container,marginTop: -60,marginRight: 0,spacingLeft: 0,spacingBottom: 0,backgroundColor: null,},pane: {
        center: ['50%','57%'],size: '75%',startAngle: -150,endAngle: 150,background: [{
            borderColor: '#000',}],tooltip: {
        enabled: false
    },title: {
        text: null,yAxis: {
        min: 0,max: 100,title: {
            y: -20,useHTML: true,text: 'graphTitle',style: {
                fontFamily: 'Raleway',fontSize: '2em',textAlign: 'center',}
        },labels: {
            enabled: false,tickInterval: 16.66,tickWidth: 5,tickPosition: 'outside',tickLength: 10,tickColor: '#000',minorTickColor: '#000',lineColor: null,plotBands: [{
            from: 0,to: 33,color: '#00A600',// green
            outerRadius: '100%',thickness: '15%'
        }]
    },plotOptions: {
        gauge: {
            innerRadius: '90%',dial: {
                backgroundColor: 'rgba(0,0.4)',}
        }
    },credits: {
        enabled: false
    },series: [{
        data: [33],dataLabels: {
            useHTML: true,//format: gaugeFormat,//Modify here to change the radial center values
            borderWidth: 0,style:{
                fontFamily:'Raleway',fontWeight: 'normal',x: 5,tooltip: {
            enabled: false,}
    }]
     },function (chart) { // on complete
       chart.renderer.text('End Time',500,370)
        .css({
            color: '#000',fontSize: '16px'
        })
        .add();
    chart.renderer.text('Start Time',240,370)

        .css({
            color: '#000',fontSize: '16px'
        })
        .add();
});

编辑:
我想要这样的东西link

解决方法

我不确定完全理解你的问题,
请查看此 link

var chart = new Highcharts.Chart({
    chart: {
        type: 'gauge',size: '60%',series: [{
        data: [100],function (chart) { // on complete
      console.log(chart); chart.renderer.text(chart.series[0].data[0].y,140+chart.series[0].data[0].y*2,350)
        .css({
            color: '#000',fontSize: '16px'
        })
        .add();

});

Highcharts 2.1.7 发布,纯Javascript图表

Highcharts 2.1.7 发布,纯Javascript图表

Highcharts 2.1.7版本于2011年10月19日发布。

自2.1.6以下改变:

  • 新增大多数文本相关的配置对象的useHTML选择。
  • 新增softConnector为饼图的数据标签的选项。
  • 新增chart.selectionMarkerFill选项。
  • 修复数据标签定位馅饼的问题。
  • 修复在某些情况下,覆盖点的工具提示的问题。
  • 修复最新MooTools的问题。
  • 关于内存泄漏问题的工作。

Highcharts 2.2.5 发布,纯Javascript图表库

Highcharts 2.2.5 发布,纯Javascript图表库

Highcharts是一个制作图表的纯Javascript类库,主要特性如下:

  • 兼容性:兼容当今所有的浏览器,包括iPhone、IE和火狐等等;
  • 对个人用户完全免费;
  • 纯JS,无BS;
  • 支持大部分的图表类型:直线图,曲线图、区域图、区域曲线图、柱状图、饼装图、散布图;
  • 跨语言:不管是PHP、Asp.net还是Java都可以使用,它只需要三个文件:一个是Highcharts的核心文件highcharts.js,还有a canvas emulator for IE和Jquery类库或者MooTools类库;
  • 提示功能:鼠标移动到图表的某一点上有提示信息;
  • 放大功能:选中图表部分放大,近距离观察图表;
  • 易用性:无需要特殊的开发技能,只需要设置一下选项就可以制作适合自己的图表;
  • 时间轴:可以精确到毫秒;

Highcharts 2.2.5 发布了,下载地址:Highcharts 2.2.5

该版本主要是 bug 修复,详细记录包括:

  • Fixed Android 2 compatibility problem. Issue 1034
  • Fixed issue with legend text not wrapping correctly to itemStyle.width option ion IE8. Issue 1021.
  • Removed double clipping assignment in development branch, and subsequent JS error on Series.remove in legacy IE. Issue 1027.
  • Fixed broken minRange after the #878 fix.
  • Reverted fix for #904 where a line with lineWidth of 0 became visible in hover state. Issue 1016.
  • Added legend.maxHeight option for paging.
  • Fixed issue with chart title and subtitle responding too late to chart resize. Issue 1012.
  • Fixed JS error on quickly changing range selection in Highstock in column charts. Issue 1004.
  • Fixed issue with clipping of legend after resize to a greater width. Issue 1001.
  • Fixed issue with size detection of rotated text in exported charts legacy IE. Issue 997.
  • Fixed issue with original mouse event information not being passed over to legendItemClick handler. Added it to event.browserEvent. Issue 4. Issue 992.
  • Fixed issue with the series.pointRange option not affecting the width of columns.
  • Added tooltip formatting options: percentageDecimals, percentagePrefix, percentageSuffix, totalDecimals, totalPrefix, totalSuffix. Issue 864.
  • Fixed issue with error #10 appearing on a chart with all null data if yAxis.min was set.
  • Fixed issue when colorByPoint was set to true, it started from the second item in the color array, whereas the first one was assigned to the whole series. Issue 974.
  • Fixed JS error on setting categories with fewer items before the chart was redrawn. Issue 970.

Highcharts 2.3.3 发布,纯Javascript图表库

Highcharts 2.3.3 发布,纯Javascript图表库

Highcharts是一个制作图表的纯Javascript类库,主要特性如下:

  • 兼容性:兼容当今所有的浏览器,包括iPhone、IE和火狐等等;
  • 对个人用户完全免费;
  • 纯JS,无BS;
  • 支持大部分的图表类型:直线图,曲线图、区域图、区域曲线图、柱状图、饼装图、散布图;
  • 跨语言:不管是PHP、Asp.net还是Java都可以使用,它只需要三个文件:一个是Highcharts的核心文件highcharts.js,还有a canvas emulator for IE和Jquery类库或者MooTools类库;
  • 提示功能:鼠标移动到图表的某一点上有提示信息;
  • 放大功能:选中图表部分放大,近距离观察图表;
  • 易用性:无需要特殊的开发技能,只需要设置一下选项就可以制作适合自己的图表;
  • 时间轴:可以精确到毫秒;

Highcharts 2.2.5 发布了,下载地址:Highcharts 2.3.3 

该版本主要是 bug 修复,详细记录包括:

 

Version 2.3.3 (2012-10-04)

  • Refactored data label alignment logic for better maintainabilit. Issue #1168. Issue #1212.
  • Worked around label positioning problem in IE9 and IE10. Issue #1101.
  • Fixed gauge series data labels after regression testing
  • Fixed issue with yAxis labels with a minus prefix being wrapped into two lines. Issue #1273.
  • Fixed JS errors on continuously destroying charts in window.resize. Issue #1257.
  • Fixed orphaned marker after Point.update to null. Issue #1269.
  • Fixed issue with text wrapping and bounding boxes in Android 2. Issue #1140.
  • Worked around Safari 6 bug causing disappearing pie slices. Issue #1208.
  • Fixed wrong positions of polar column chart data labels. Issue #1199.
  • Fixed error in VML browsers when redrawing a chart with an image background. Issue #1245.
  • Fixed issue with shadow.offsetX and shadow.offsetY set to 0 being replaced by 1. Issue #1224.
  • Fixed text rotation with useHTML in Firefox 15. Issue #916.
  • Fixed issue with tooltip spilling out to the left in inverted chart. Issue #1231.
  • Fixed issue with null points in stacked columns on a logarithmic scale. Issue #1232.
  • Fixed issue with colors and borderWidth not being applied to individual dials in gauges.
  • Use point.name in the tooltip header even on datetime axis. Issue #976.
  • Fixed JavaScript errors in Firefox 3.6 when displaying the tooltip. Issue #1236.
  • Fixed floating number errors in stack totals. Issue #1223.
  • Fixed issue in 2.3 with the sizing of linked axes. Issue #84.
  • Fixed issue with span styles not being applied across line breaks in SVGRenderer. Issue #390.
  • Fixed issue with series marker options not being reflected in the legend symbol. Issue #674.

 

Highcharts 5.0.10 发布,纯 Javascript 图表库

Highcharts 5.0.10 发布,纯 Javascript 图表库

Highcharts 5.0.10 发布了。Highcharts 是一个制作图表的纯 Javascript 类库。

更新内容:

  • Added !default statement to SASS variables for easier configuration. Closes #6436.

  • Added new option, plotOptions.column.crisp, to allow disabling crisp columns and subsequent rendering issues with densely packed items. Closes #5755.

  • Added new option, findNearestPointBy to declare how the tooltip searches for points. #6231.

  • Refactored the Pane object to keep track of its own backgrounds, more decoupled from Axis.

Bug 修复

  • Fixed #3481, title and subtitle were not resizing chart correctly when using useHTML on true.

  • Fixed #3936, colorAxis was not updated through chart.update.

  • Fixed #4964, missing plotband when small range.

  • Fixed #6007, exporting after chart.update() threw errors.

  • Fixed #6144, empty categories caused wrong render of tooltip.

  • Fixed #6191, dead clip path references.

  • Fixed #6203, yAxis extremes were wrong calculated for visible scatter points

  • Fixed #6258, text labels with ellipsis had inconsistent behavior.

  • Fixed #6279, error when hiding series of line polar using data module.

  • Fixed #6359, softMin/softMax didn''t work in combination with floor/ceiling.

  • Fixed #6430, areasplinerange polar curve path was wrongly rendered.

  • Fixed #6431, addition to #6476, stickyTracking should default to true when there is a shared tooltip.

  • Fixed #6433, updating Axis with plotBands rendered redundant nodes.

  • Fixed #6437, 3D pie chart disappeared when drilling down after resize.

  • Fixed #6444, exporting the second time failed with axis extremes.

  • Fixed #6449, series with noSharedTooltip was inaccessible with shared tooltip.

  • Fixed #6452, chart.update was not redrawing axes when setting alignTicks to false.

  • Fixed #6456, tooltip didn''t show on hovering outside candlestick and OHLC series.

  • Fixed #6458, named color deduction was case sensitive.

  • Fixed #6459, colors of boxplot series points would not update.

  • Fixed #6463, missing closing sign in RegEx caused wrong handling of pseudo attributes.

  • Fixed #6465, first data label in polar charts was not visible.

  • Fixed #6469, series got lost when mixing category data in a dual axis chart.

  • Fixed #6470, exporting failed in IE8 when data labels were enabled.

  • Fixed #6473, wrong text wrapping with textOutline: none.

  • Fixed #6474, custom CSS property was injected into the DOM. Added to blacklist.

  • Fixed #6474, text outlines were not properly cleaned up on resizing.

  • Fixed #6476, shared tooltip with disabled stickyTracking did not work.

  • Fixed #6477, regression on crosshairs with snap in a bubble chart.

  • Fixed #6479, responsive rules didn''t apply to panes.

  • Fixed #6481, offline export of pie charts to PDF not working in Firefox and Safari.

  • Fixed #6487, contrast color was not applied for a justified label on a column.

  • Fixed #6497, horizontal legend layout didn''t respect spacing setting.

  • Fixed #6499, offline export fails with allowHTML despite no HTML in chart.

  • Fixed #6502, missing chart series and axis in combined logarithmic chart.

  • Fixed #6518, wrong marker positions when hovering after redrawing in boost module.

  • Fixed #6519, empty space caused overlapping in legend.

  • Fixed #6521, missing label for narrow plot band.

  • Fixed #6089, chart.update not taking effect on panes. Also closes #6438.

下载地址:

  • Source code (zip)

  • Source code (tar.gz)

关于javascript – Highcharts规范不渲染文本javascript数据渲染的问题我们已经讲解完毕,感谢您的阅读,如果还想了解更多关于Highcharts 2.1.7 发布,纯Javascript图表、Highcharts 2.2.5 发布,纯Javascript图表库、Highcharts 2.3.3 发布,纯Javascript图表库、Highcharts 5.0.10 发布,纯 Javascript 图表库等相关内容,可以在本站寻找。

本文标签: