Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AmGaugeBand error #12

Open
dardison opened this issue Oct 24, 2018 · 2 comments
Open

AmGaugeBand error #12

dardison opened this issue Oct 24, 2018 · 2 comments

Comments

@dardison
Copy link

Trying to use AngularGauge, I have problem setting Band.

This is my Java code:

	protected void buildUI(){
		this.chart=new AngularGauge();
		this.chart.setHeight("300px");
		this.chart.setWidth("100%");
		axis=new GaugeAxis();
		axis.setTopTextFontSize(20);
		axis.setTopTextYOffset(70);
		axis.setAxisColor("#31d6ea");
		axis.setAxisThickness(1);
		axis.setEndValue(100);
		axis.setGridInside(true);
		axis.setInside(true);
		axis.setRadius("50%");
		axis.setValueInterval(10);
		axis.setTickColor("#67b7dc");
		axis.setStartAngle(-90);
		axis.setEndAngle(90);
		axis.setUnit("%");
		axis.setBandOutlineAlpha(0);
		
		// Bands
		ArrayList<GaugeBand> bands=new ArrayList<>();

		GaugeBand band=new GaugeBand();
		band.setEndValue(100);
		band.setColor("#0080ff");
		band.setInnerRadius("105%");
		band.setRadius("170%");
		double[] gradientRatio={0.5, 0, -0.5};
		band.setGradientRatio(gradientRatio);
		band.setStartValue(0);
		bands.add(band);
		
		secondBand=new GaugeBand();
		secondBand.setColor("#3cd3a3");
		secondBand.setEndValue(0);
		secondBand.setInnerRadius("105%");
		secondBand.setRadius("170%");
		secondBand.setGradientRatio(gradientRatio);
		secondBand.setStartValue(0);
		bands.add(secondBand);
		
		GaugeBand[] barray=new GaugeBand[bands.size()];
		axis.setBands(bands.toArray(barray));
		
		this.chart.setAxes(axis);
		
		arrow=new GaugeArrow();
	    arrow.setAlpha(1);
		arrow.setInnerRadius("35%");
		arrow.setNailRadius(0);
		arrow.setRadius("170%");
	    this.chart.setArrows(arrow);
	}

And the error is this:

Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : ((intermediate value)(intermediate value) , (intermediate value)(intermediate value) , $tmp_1_g$).getAmGaugeBand_0_g$(...).setEndValue is not a function
	at Unknown.dEj_g$(GaugeBand.java:85)
	at Unknown.Cxj_g$(GaugeChart.java:49)
	at Unknown.Axj_g$(GaugeChart.java:21)
	at Unknown.vxj_g$(ActivityGaugeViewImpl.java:11)
	at Unknown.twj_g$(ActivityDashboardPresenter.java:27)
	at Unknown.z_g$(ActivityDashboardPresenter.java:22)
	at Unknown.Lc_g$(ActivityDashboardActivity.java:10)
	at Unknown.DA_g$(ApplicationPresenter.java:42)
	at Unknown.JA_g$(ApplicationPresenter.java:61)
	at Unknown.OB_g$(ApplicationViewUI.java:99)
	at Unknown.iC_g$(ApplicationViewUI.java:99)
	at Unknown.qY_g$(MaterialWidget.java:1057)
	at Unknown.qTg_g$(MaterialWidget.java:1055)
	at Unknown.FAd_g$(ClickEvent.java:56)
	at Unknown.GAd_g$(ClickEvent.java:55)
	at Unknown.sr_g$(GwtEvent.java:76)
	at Unknown.sJd_g$(EventBus.java:40)
	at Unknown.YJd_g$(SimpleEventBus.java:193)
	at Unknown.cKd_g$(SimpleEventBus.java:88)
	at Unknown.KJd_g$(HandlerManager.java:127)
	at Unknown.QU_g$(Widget.java:129)
	at Unknown.Mzd_g$(DomEvent.java:125)
	at Unknown.YU_g$(Widget.java:177)
	at Unknown.Wke_g$(DOM.java:1481)
	at Unknown.Vke_g$(DOM.java:1420)
	at Unknown.ere_g$(DOMImplStandard.java:317)
	at Unknown.s6b_g$(Impl.java:309)
	at Unknown.v6b_g$(Impl.java:361)
	at Unknown.anonymous(Impl.java:78)

The problem is in this line: band.setEndValue(100);

Any idea? Not sure if this is a bug or I was configuring something wrong.

@dardison
Copy link
Author

Also have the same error at: band.setStartValue(0)
and at GaugeAxis at line 361

@kevzlou7979
Copy link
Contributor

I will patch this on comming weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants