I am working on a bubble graph issue where the graph is distorted whenever the Y-axis labels are long
Ideally the graph should appear like the Normal.gif.
But if the labels are long, it is appearing like distorted.gif.
Hence , I tried to show only the first 15 characters of the labels followed by 3 ellipses (3 dots ...). But still there is so much space between the label names and the plot area.
Is there any way to reduce this space. Any idea which property of the graph controls this space. Also whenever the labels are concatenated to show only the first 15 characters, we need to show the full name when we hover the mouse over the name. How do we achieve this? Please let me know if you have any pointers on this.
<dvt:x1MajorTick lineWidth="0" tickStyle="GS_NONE"/>
<dvt:x1Title text="#{HcmGoalTopGenBundle['MenuItem.Performance.AddtoPerformanceGoal']}"
rendered="true">
<dvt:graphFont bold="true"/>
</dvt:x1Title>
<dvt:y1Axis majorTickStepAutomatic="false"
majorTickStep="#{bindings.YMinorTick.inputValue}"
axisMinAutoScaled="false" axisMaxAutoScaled="false"
axisMinValue="#{bindings.YLowerBoundary.inputValue}"
axisMaxValue="#{bindings.YUpperBoundary.inputValue}"></dvt:y1Axis>
<dvt:y1TickLabel>
<af:convertNumber pattern="#{applCorePrefs.numberFormatPattern}"/>
</dvt:y1TickLabel>
<dvt:y1MajorTick lineWidth="0" tickStyle="GS_NONE"/>
<dvt:y1Title text="#{hcmperformancedocspublicuiBundle1['OText.Potential.PotentialRating']}"
rendered="true">
<dvt:graphFont bold="true"/>
</dvt:y1Title>
<dvt:seriesSet defaultMarkerShape="MS_HUMAN"/>
<dvt:shapeAttributesSet>
<dvt:shapeAttributes component="GRAPH_DATAMARKER"/>
</dvt:shapeAttributesSet>
<dvt:legendArea position="LAP_RIGHT" rendered="false"/>
</dvt:graph>
I worked on this too..and found out that this is a framework issue. the same has been reported to the framework team
Related
I'm trying to get the detect the number of horizontal and vertical lines and based on that, I want to detect the name of the symbol.
I have tried this approach,
Java image analysis - counting vertical lines
but the solution is very image specific whereas in my case, the image threshold would change according to the image.
These are some of the symbols that I have to detect (have a set of more 30 symbols). I have used some other approaches using Marvin, but those are also not giving me proper results.
Any help would be highly appreciated.
Thank you.
I have an app where the user is given plenty of options, and depending on user selection anything from 1 up to 20 scatter plots will be displayed dynamically in the same scatter chart.
I want to add a checkbox to show best fits for each of these samples, same color as the original scatter points, but then using lines.
Even though I like the answer provided here, it solves the problem "statically", i.e. for small and fix number of series.
Is there a way to automate this solution for a large and dynamically changing number of series?
I'd rather not use superimposed charts and setting transparency, unless I really have to.
As you pointed out about this here , if you want to create a Scatter chart with line regression ( linear or polynomial ) have a look to my own implementation of a Multi-Axis-Scatter-Chart maybe you will take some ideas about your problem. I am not sure about what you need cause do be honest I didn't understand your question at 100%. I hope my own implementation might help you somehow.
I am trying to find the best strategy to produce a 1D time based plot with labels. It currently looks like this:
The problem is there is spans of time where very little happens, and others with high density.
What I would like to achieve is to distort the time axis so that in the dense areas the labels are spaced apart to avoid overlap. Alternatively, I could imagine to show the actual data points without axis distortion, but distribute the labels so that they do not overlap.
EDIT: This is my attempt to clean up the mess manually, to get an idea of which output I would like to have:
You might experiment with some combination of pan and zoom using setDomainPannable() and setMouseWheelEnabled(), seen here and here. Right-click to see the context menu and control-click to pan (option-click on Mac OS X).
Basically I'm having a very similar issue to the following article: http://www.jfree.org/phpBB2/viewtopic.php?t=24713
Except that instead of differences in versions, my results for labels are much like the 3rd pie chart where I would prefer to have them like the 1st chart (more space per line - wider lines) so that they don't have to wrap to the next line so quickly. I've tried everything I can think of to increase the size of the labels, but nothing seems to be working.
My main thinking is to adjust where the label starts to get written, and through a lot of debugging the source, I was able to extend the size of the box but not the actual string. I couldn't find a way to do it without editing the source through some kind of configuration, and even then I wasn't able to adjust the text properly, only the box. And it took a good deal of effort, the code isn't in the same place for both.
Any suggestions on how to setup the pie chart so that the labels as illustrated in the article above work more like the 1st chart than the last chart would be appreciated. I did what was suggested in the post:
plot.setInteriorGap(0.02);
plot.setMaximumLabelWidth(0.20);
plot.setLabelLinkStyle(PieLabelLinkStyle.CUBIC_CURVE);
but it made no real difference. The default is no CUBIC_CURVE in the latest version. The setInteriorGap did have a slight improvement but it was minimal. And the other line did nothing.
What's really troubling is how much white space there is on the left and right of the generated chart. It would be great to be able to use that space somehow.
I am not sure about the first issue. However, I have some idea as to what to do about leftover whitespace.
If you are converting the chart to an image, you can try trimming the whitespace around it via the following:
BufferedImage chartImage = chart.createBufferedImage(width, height);
chartImage = chartImage.getSubImage(howMuchToTrimOnLeft, howMuchtoTrimOnTop, width - howMuchToTrimOnLeft - howMuchToTrimOnRight, height - howMuchtoTrimOnTop - howMuchToTrimOnBottom);
The resulting chartImage will contain a trimmed version. Make sure to make the initial width and height values larger than the dimensions of the area you want the chart to take up, then trim it down to size.
You know in MS Word, you can write text and draw&put shapes anywhere you want.. in the text when you hit enter and get to a new line, the shapes below your cursor also moves down one line? I want to implement that property in Java on a pane, using components as the shapes and text. How can I provide absolute positioning for shapes but at the same time preserve the space between them? I'll appreciate any idea, cause I'm almost out of ideas.
Maybe you could use SpringLayout?
Spring layouts do their job by defining directional relationships, or constraints, between the edges of components. For example, you might define that the left edge of one component is a fixed distance (5 pixels, say) from the right edge of another component.