Bar in chart jumps randomly after set range of Y-axis

Stimulsoft Reports.JS discussion
Post Reply
komendan
Posts: 3
Joined: Mon Nov 07, 2016 3:41 am

Bar in chart jumps randomly after set range of Y-axis

Post by komendan »

Why does the bar in chart jumps (not started by 0) randomly after I set the range of Y-axis (0 to 100) for all charts?
It happened randomly depends on the value of the data source json.
The bar looks normal before i set the y-axis range.
Chart type: clustered column
Stimulsoft version: Stimulsoft-Reports-PHP-2016.2-Pack.zip
Attachments
bar is jumping (not started by 0)
bar is jumping (not started by 0)
the chart bar jumps after set max y axis for all graphs.png (65.44 KiB) Viewed 2967 times
datasource.json
json data source
(5.74 KiB) Downloaded 189 times
Report_tes1_perfect.mrt
mrt file
(61.43 KiB) Downloaded 190 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Bar in chart jumps randomly after set range of Y-axis

Post by Alex K. »

Hello,

Thank you for the bug report.
We need some time to fix the issue. We will let you know about the result.

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Bar in chart jumps randomly after set range of Y-axis

Post by Alex K. »

Hello,

We are working on the problem. We will let you know when the solution is available.

At the current moment, you can disable animation for the Chart:

Code: Select all

var options = new Stimulsoft.Viewer.StiViewerOptions(); 
options.appearance.chartRenderType = Stimulsoft.Viewer.StiChartRenderType.Vector;
Thank you.
komendan
Posts: 3
Joined: Mon Nov 07, 2016 3:41 am

Re: Bar in chart jumps randomly after set range of Y-axis

Post by komendan »

Hi Aleksey,
Thanks for the answer.
I tried your code but the animation still exist and bar in chart still jumped.
Is there anything wrong about to place the disable animation code in this is my code below?

Code: Select all

<body>
	<div id="gli_result">
		<script type="text/javascript">
			var options = new Stimulsoft.Viewer.StiViewerOptions(); 
			options.appearance.chartRenderType = Stimulsoft.Viewer.StiChartRenderType.Vector;
			var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
			viewer.onBeginProcessData = function (event, callback) {
				jsHelper.process(typeof args != "undefined" ? args : (typeof event != "undefined" ? event : null), typeof callback != "undefined" ? callback : null);
			}
			// Load and show report
			var report = new Stimulsoft.Report.StiReport();
			report.loadFile("Report_tes1_perfect.mrt");
			
			//data set
			var dataSet = new Stimulsoft.System.Data.DataSet('SimpleDataSet');
			dataSet.readJsonFile("datasource.json");
			report.dictionary.databases.clear();
			report.regData(dataSet.dataSetName, "", dataSet);
			report.render();

			var settings = new Stimulsoft.Report.Export.StiHtmlExportSettings();
			var service = new Stimulsoft.Report.Export.StiHtmlExportService();
			var textWriter = new Stimulsoft.System.IO.TextWriter();
			var htmlTextWriter = new Stimulsoft.Report.Export.StiHtmlTextWriter(textWriter);
			 
			service.exportTo(report, htmlTextWriter, settings);
			var resultHtml = textWriter.getStringBuilder().toString();
			document.write(resultHtml);
		</script>
	</div>
  </body>
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Bar in chart jumps randomly after set range of Y-axis

Post by HighAley »

Hello.

There was a lot of improvements.
And the charts are shown right.
Please, upgrade to our latest build.

Thank you.
komendan
Posts: 3
Joined: Mon Nov 07, 2016 3:41 am

Re: Bar in chart jumps randomly after set range of Y-axis

Post by komendan »

The issue has been solved by disabling the animation in exported html by this code.

Code: Select all

var settings = new Stimulsoft.Report.Export.StiHtmlExportSettings();
settings.chartType = Stimulsoft.Report.Export.StiHtmlChartType.Vector;
Thanks for the help Aleksey and HighAley!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Bar in chart jumps randomly after set range of Y-axis

Post by Alex K. »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply