Opened 7 years ago

Closed 7 years ago

#15674 closed defect (invalid)

default: charting yAxis (NaN) title out of bounds

Reported by: psiberia Owned by: Eugene Lazutkin
Priority: undecided Milestone: tbd
Component: Charting Version: 1.8.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

Using the following code, the y-axis title appears nearly out of bounds of the chart. This is likely to the position being incorrectly calculated and returning a NaN with the following errors:

Unexpected value NaN parsing y attribute. Unexpected value matrix(-0.00000000,-1.00000000,1.00000000,-0.00000000,NaN,NaN) parsing transform attribute.

/ Code /

var chartTop = new Chart("chartTop", {

title: 'Chart Title', titlePos: 'top', top, bottom titleGap: '200', titleFont: 'normal normal normal 15pt Arial', titleFontColor: 'black'

});

chartTop.addPlot("default", {

type: "Lines", markers: false, enableCache: true, htmlLabels: false, hAxis: 'x', vAxis: 'y'

}) .addAxis("x", {

title: 'x axis', titleGap: 15, titleOrientation: 'away'

}) .addAxis("y", {

title: 'y axis', vertical: true, min: 0, max: 100, fixUpper: "major", fixLower: "major"

}) .setTheme(customTheme) .addSeries("Series A", [{x:1,y:3},{x:2,y:5},{x:3,y:6},{x:4,y:7},{x:5,y:7},{x:6,y:8},{x:7,y:4},{x:8,y:3},{x:9,y:7}], {

plot:'default', stroke: {width:1.25}

}) .render();

Attachments (2)

Screen Shot 2012-07-13 at 4.41.05 PM.png (8.9 KB) - added by psiberia 7 years ago.
very top left you see the hints of the title on the y-Axis
Screen Shot 2012-07-13 at 4.44.14 PM.png (80.8 KB) - added by psiberia 7 years ago.
rendered svg object, showing the NaN on the y positioning

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by psiberia

very top left you see the hints of the title on the y-Axis

Changed 7 years ago by psiberia

rendered svg object, showing the NaN on the y positioning

comment:1 Changed 7 years ago by psiberia

I have identified the issue causing the NaN. It is also causing the chart title gap not set it self correctly ..

If the titleGap on the chart object is not an integer it causes the aforementioned issue. In my previous posted code it is a string. If I correctly set the property to an integer the chart y title renders and the correct gap is applied to the chart title.

comment:2 Changed 7 years ago by cjolif

Resolution: invalid
Status: newclosed

user error (use of string instead of number)

Note: See TracTickets for help on using tickets.