简体   繁体   English

折线图情况下,Jfree图表不计算Y轴

[英]Jfree chart is not calculating the Y axis in case of line chart

I am using jfree.chart for graph rendering. 我正在使用jfree.chart进行图形渲染。 I am using the Line chart but it is rendering the graph properly and showing the Y axis as shown in the attached snapshot. 我正在使用折线图,但它可以正确渲染图形并显示Y轴,如所附快照所示。 I am not sure what is this or why is this. 我不确定这是什么,为什么? But it seems that Y-axis is not calculating. 但似乎Y轴没有计算。 Please advice what possibly could there be missing that is leading to this. 请告知可能导致这种情况的缺失。

Following is the snippet of the code: 以下是代码片段:

case GraphType.LINE_CHART: case GraphType.SCATTER_PLOT: theCharts[0] = CreateLineChart(tsChartTitleStructure.GetText(), strXAxisTitle, straYAxisTitles[0], datasets[0], thePlotOrientation, bShowLegend); case GraphType.LINE_CHART:case GraphType.SCATTER_PLOT:theCharts [0] = CreateLineChart(tsChartTitleStructure.GetText(),strXAxisTitle,straYAxisTitles [0],数据集[0],thePlotOrientation,bShowLegend); break; 打破;

Thanks 谢谢 在此处输入图片说明

Thanks for your responses. 感谢您的回复。 Wanted to share with you guys that it is the problem when we set the range of the graph. 希望与大家分享我们设置图表范围时遇到的问题。 In JFree chart there is a range that can be defined by Min and Max values. 在JFree图表中,有一个可以由最小值和最大值定义的范围。 So in our case this range was 1 for Min and 1 for Max which was causing this problem. 因此,在我们的情况下,导致此问题的范围是1(最小值)和1(最大值)。 So I think I have got the solution for this. 所以我想我已经找到了解决方案。 So if there is some issue with the range set on the graph created in JFree, it could be helpful to look at the Min and Max values set as range on the graph. 因此,如果在JFree中创建的图形上设置的范围存在问题,那么查看在图形上设置为范围的最小值和最大值可能会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM