Sign in to follow this  
sefutz

Flex Problem With Chart Labels Not Taking In Consideration The Value Of The Label

Recommended Posts

Hello,

I am trying to build a ScrollLine2D chart that has x labels as: 3,4,12

and y values as : 20,40, 60

As you can see the labels 3, 4, 7,12 are not proportionate, meaning that you should have 3 units for 3, another unit for 4 and 3 more for 7. All the labels have the same distance between each other.

chartData = new ArrayCollection();
				var obj:Object;
				var totalCnt:int = 0;
				//put the X labels
				for each(item in graphArr){
					obj = new Object();
					if(item.count > 0){
						totalCnt += item.count;
						obj.label = totalCnt;
						chartData.addItem(obj);
					}
				}

 

				chartParams = new ArrayCollection([
					{bgAlpha: '0'},
					{canvasBgAlpha: '0'},
					{showValues: "0"},
					{yAxisMinValue:'0'},
					{yAxisMaxValue:maxValue},
					{formatNumberScale:"1"},
					{divLineDecimalPrecision:"1"},
					{labelStep:'1'},
					{yAxisName: "% Correct"},
					{xAxisName: "# of Students"},
					{plotGradientColor: ''},
					{plotSpacePercent: '40'}
				]);

 

chart = new FusionCharts();
			chart.width = this.width * 0.9;
			chart.height = this.height * 0.7;
			chart.FCChartType = "ScrollLine2D";
			chart.FCFolder = "fusioncharts";

			chartContainer.removeAllElements();
			chartContainer.addElement(chart);
			chart.FCData(chartData);
			chart.FCParams(chartParams);
			chart.FCRender();

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this