Highcharts

Unable to assert axis label text in highcharts using Geb

╄→гoц情女王★ 提交于 2019-12-12 04:53:58
问题 I am writing a geb test that asserts the axis labels in a highcharts graph. The test I wrote works when run with the selenium chrome driver. When I run with phantomjs it fails. //Selector in GEB $(id:"graph-id").find("g.highcharts-legend-item").find("tspan").text() This returns as expected in Chrome. It returns empty in phantomjs. We have to use phantomjs for our CI builds. 回答1: If for whatever reason geb isn't supporting your phantomjs driver properly, you can always execute a javascript

Highstock navigator does not work when also importing “highcharts-more” file

送分小仙女□ 提交于 2019-12-12 04:53:27
问题 Does anyone know why this is happening? If I remove this - <script src="http://code.highcharts.com/highcharts-more.js"></script> The navigator data series renders fine, but if I add it, the data series stops rendering and only the range selector shows. Please help. My jsfiddle - (does not work) http://jsfiddle.net/Yrygy/258/ Jsfiddle - (works) http://jsfiddle.net/Yrygy/257/ 回答1: Reorder the scripts. Move highcharts-more.js above highstock.js and it will work. I think the problem is because of

Method of object as handler

*爱你&永不变心* 提交于 2019-12-12 04:53:14
问题 I try this: function MovableLine (line, number) { this.line = line; this.number = number; } MovableLine.prototype.start = function (e) { alert(this.number); alert(this); }; and then: var mline = this.xAxis[0].plotLinesAndBands[plotLinesCount].svgElem; mline.css({ 'cursor': 'pointer' }); mline.translate(0, 0); movableLine = new MovableLine(mline, 10); movableLine.line.on('mousedown', movableLines[plotLinesCount].start); result: first alert: undefined second alert: object SWGPathElement How to

Trouble referencing highchart.js in Meteor application

喜你入骨 提交于 2019-12-12 04:49:47
问题 I am trying to use highcharts.js in a Meteor.js application but can't get past the initial referencing errors. My console is showing the following: Resource interpreted as Script but transferred with MIME type text/html: "http:// localhost :3000/highcharts.js". localhost:9 Uncaught SyntaxError: Unexpected token < :3000/highcharts.js:1 Uncaught TypeError: Cannot set property 'innerHTML' of null highcharts.js:55 I have the highchart.js file in my client/lib directory and my highchart javascript

How to create a div container for a highcharts graphic by means of code?

自闭症网瘾萝莉.ら 提交于 2019-12-12 04:47:48
问题 I need to create a div container for a highcharts graphic. This should be done by means of code, but I can not make it work. The reason to create divs by code is because I have to show many graphics. Currently I first create the div, then the id and finally the properties. Error on graphic: Example : http://jsfiddle.net/povyq7em/1/ My code is: var nombre="container-speed"; var div = document.createElement('div'); div.setAttribute("style", "width: 580px; height: 400px; float: left"); div

Highcharts Line Chart, display series name at the end of line series

℡╲_俬逩灬. 提交于 2019-12-12 04:47:12
问题 We have requirement for line chart as below. We are using highcharts. Our requirement is that chart should display series name at the end of line as displayed in below images. How can we achieve this? 回答1: As an alternative to the renderer() , I find it convenient to use the dataLabels for this purpose. The idea being to disable dataLabels in the plotOptions , but define the position and format anyway. Then enable the dataLabels for the last point in each series' data array. Example:

Highchart line renders bigger when exported to pdf using css2pdf

对着背影说爱祢 提交于 2019-12-12 04:46:15
问题 I have a problem when i export my Highchart chart to pdf using css2pdf. Chart line gets bigger in pdf always, it doesnt mater if i set chart line width. Here is the image of chart in html: html chart Here is the code for my chart: Highcharts.chart('centersChartcontainer', { chart: { zoomType: 'xy' }, title: { text: 'Centers' }, subtitle: { text: 'Centers by year' }, xAxis: [{ categories: $scope.yearsECMOArray, labels: { interval: 1, rotation: 0, style: { fontSize: '6px', fontFamily: 'Verdana,

how do you create a link on highcharts to open up pop up window with another chart

天涯浪子 提交于 2019-12-12 04:38:20
问题 I am creating charts with highcharts. I like to put a link or button in a chart (possibley left-top corner) and when clicked, I like to call a function that shows another chart in a pop up window. Basically how they do it in highchart demo site. When clicke on the x on the top-right corner, go back to the orintal chart. I was thinking about placing a subtile and place a click event to it, as below: subtitle: { text: '<span id="node42" class="node-link">by Server</span>', align: 'left' }, I

Using arearange series in highchart on inverted graphs

大兔子大兔子 提交于 2019-12-12 04:38:13
问题 my question is quite simple : have you already experienced some trouble using the arearange series on inverted chart with Hightchart ? As you can see in this JSFiddle example ( its the arearange example where I've added the inverted settings.) chart: { type: 'arearange', zoomType: 'x', inverted:true //toggle this setting true/ false to see the differences }, The displayed data seems totally broken. We can zoom in to compare, the displayed data is totally different when inverted :/ Anybody

How to set tooltip border color from series in Highcharts

泪湿孤枕 提交于 2019-12-12 04:37:38
问题 By default, the border takes the color of the corresponding series or point. But I'd like to set a different color to the tooltip of a certain data point, without changing the color of the data point itself. I needed something like this: series: [ { x:1, value: 2.34, tooltip:{borderColor: '#112233'} }, ... ]; Sadly this property can not be set from a series. By setting a formatter callback function in the tooltip configuration one can only define the inner HTML of the tooltip, i.e. the border