Project

General

Profile

Defect #756

Horizontal BarChart using Google chart with height=501 and barWidth=20

Added by Curt Cadwell over 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
charting
Target version:
Start date:
11/05/2013
Due date:
% Done:

0%

Estimated time:
Browser (if web client):
chrome

Description

I'm trying to create a horizontal Google BarChart that will have an unknown number of yAxis records for each bar and marker. I have run into a problem when I specify a barWidth of 20 and a height of 501 or greater the chart will not display. OR if I comment out the barWidth and give the width of 600 and the height of 600 I don't get a chart.
I have included the method getBarChartDef() that I have changed in the example solution so as to reproduce my problem.

BTW When I tried to post this the first time I got an error that I didn't provide: OS version can't be blank
Java version can't be blank,Value is invalid
But I lost my file that I attached :(


Files

getBarChartDef.txt (2.52 KB) getBarChartDef.txt method to reproduce Curt Cadwell, 11/05/2013 06:55 PM

History

#1

Updated by Patrick Talbot over 10 years ago

  • Status changed from New to In Progress

If you use a height and width of 600x600 make sure you're using Eastwood, Google chart has limits on the size of the image to display.
As to the bar chart's barWidth and height value, I'll check it out, but it's possible that you are running into some limit of Google.
Try using Eastwood and I'll check your script and see what I can find...

#2

Updated by Curt Cadwell over 10 years ago

Well I was hoping to use the marker on the bar and I thought Eastwood doesn't support.
I was hoping to mark each bar with the total percentage at the end of each bar since but maybe its just not possible.

#3

Updated by Patrick Talbot over 10 years ago

No, I'm afraid there's no support for label at the end of the bars in Eastwood.

In Google chart, you could try something like this:

var data1 = {data: [45], colors: ['#BB5555'], legend: 'Servoy', markers: {text: '45'}]};
var data2 = {data: [58], color: ['#00FFFF'], legend: 'Stuff', markers: {text: '58'}};
var data3 = {data: [77], color: ['#5555BB'], legend: 'Rules!', markers: {text: '77'};
chartDef.bars = [data1, data2, data3];

#4

Updated by Curt Cadwell over 10 years ago

Thanks for the example that is exactly what I was wanting to do. I just had to adjust the code in the markers: to an array but there was a hint in your first line for the array.
var data1 = {data: [45], color: ['#BB5555'], legend: 'Servoy', markers: [{text: '45'}]};
var data2 = {data: [58], color: ['#00FFFF'], legend: 'Stuff', markers: [{text: '58'}]};
var data3 = {data: [77], color: ['#5555BB'], legend: 'Rules!', markers: [{text: '77'}]};
chartDef.bars = [data1, data2, data3];

#5

Updated by Patrick Talbot over 9 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF