Jump to content
Software FX Community

mcstoufer

Members
  • Posts

    42
  • Joined

  • Last visited

mcstoufer's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I've tried to get to display a truetype font for an x-axis label (and rotated), but the system refuses to load the TT version of the font. private Font font = new Font("Arial", Font.PLAIN, 11); I've verified that the Arial.ttf file is in $JAVA_HOME/lib/fonts and is listed in the fontconfig.properties.src Try as I might, the debugger still shows this as a Type 1 font. What gives?
  2. All the answers for this in the forums are rather outdated. Any suggestions on how this can be accomplished now? There are just too many Chart methods related to size and scaling that aren't documented enough. In looking at the renderToStream example in the samples, I can't see where I would resize the rendered image.
  3. I have a bar chart that is using Conditional Attributes to color areas of the Chart. When the number of bars and the width hit a "sour spot" with respect to size, I get ugly antialias vertical white bar artifacts in the image. If the chart gets narrower they go away, if the chart gets wider, more and more of the bars appear equaly spaced among the real values. When the chart is wide enough, the individual bars are resolvable. I have verified that the data has no "0" values in it. I also checked the image-map overlay, and it has no "0" values in it either. Turning on/off the chart1.setAntialiasing() does not seem to have any noticable effect. This is being generated on OSX 10.6.5 with Netbeans 6.8
  4. Thank you for the clarification. I will make a note of this on my end for the next time this info is requested.
  5. Then why did Carlos ask for it to be supplied in the first place???
  6. CJU70************Keep in mind that this is extracted from a JSF Managed Bean context, so the main() doesn't really exist. Also, this is being rendered on a Mac Pro running Snow Leopard OS X 10.6.4 with Java 1.6.Annotations annots = new Annotations();Font font = new Font("Helvetica", Font.PLAIN, 11);Color fontColor = Color.decode("0x464646");Color annotBubbleColor = Color.decode("0x9F4B9E");AnnotationArrow yourArrow = new AnnotationArrow();AnnotationText yourBldg = new AnnotationText();annots.getList().add(yourArrow);annots.getList().add(yourBldg);yourBldg.setFont(font);yourBldg.setTextColor(fontColor);yourBldg.setColor(java.awt.Color.WHITE);yourBldg.getBorder().setColor(annotBubbleColor);yourArrow.getBorder().setColor(annotBubbleColor);yourArrow.getBorder().setWidth(4);yourBldg.setText(String.format("Your Building:\n101 kW/h\n15th percentile"));yourBldg.setOrientation(0);yourBldg.setLineAlignment(StringAlignment.FAR); // Tried the other two enum values here w/no apparent change.yourBldg.sizeToFit();yourBldg.attach(50, 50);yourArrow.setHeight(70);yourArrow.setWidth(0);yourArrow.attach(50,75);chart.getExtensions().add(annots);
  7. Not quite. I wanted to have the tick color on the axis be different than the grid line color. As I interpret the information, your suggestion would change the color of the grid line itself AND the color of the tick mark.
  8. It appears that the color and style of a tick mark for a given grid is the same as the grid. Can we override this somehow? It would be nice to have the option to make it the same color as the Axis line.
  9. Is there any way to add space between the right-aligned Y-axis labels and their tick mark? I tried to fake it with the customLabelFormat but all the trailing space chars were ignored. "#,### " ended up printing as "#,###" If the setSeperation() method could be reused to add space after axis labels, that would be ideal for me.
  10. Problem solved on this one. Apparently the border around each box (defaulted to gray) was being dithered into the fill color when the number of boxes were high (~2000). The solution here was to just turn the visibility of the border off for each CondAttr. I would like to request this be addressed by SoftwareFX. Not as a bug, but as an operational feature. Once some level is reached, the borders are no longer rendered. CustomStyleSample.zip
  11. Following up on this, if I make the Color for each condAttr to be white (255,255,255), the entire chart plots out using (192,192,192) as the color. This is just WRONG! It should be white. I'm no expert on sRGB color space math, but this should just render out as designed.
  12. I have added a few conditional attributes to a series in a plot and the colors I have assigned to them are coming out a bit darker than desired. Is there some filter I have to modify to get the exact colors? ConditionalAttributes firstQuartile = new ConditionalAttributes();firstQuartile.getCondition().setFrom(0.0);firstQuartile.getCondition().setTo((int)(value * 0.25));firstQuartile.getCondition().setToOpen(false);firstQuartile.setText("0-25%-ile of sample");firstQuartile.setColor(colors.get05QuartileColor());// #89A45EchartServer.getConditionalAttributes().add(firstQuartile); The expected color is #89A45E but renders out at #677B47. Is this a bug or feature? Do I need to set the color of the series before or something?
  13. When adding an AnnotationText object with a colored border to a chart, I'm noticing that the text is anchored to the top-left portion of the border. Using the siteToFit() method does not fix this. I tried to change the alignment and the text still stays at the top of the bounding box. How do I add some padding around the text and the border? http://energyiq.lbl.gov/images/annotationText.tiff I have attached an image to this post, so hopefully it shows up. (http://energyiq.lbl.gov/images/annotationText.tiff)
  14. The solution to this was yet another undocumented feature. The JSF context is expecting a ChartServerComp object instead of just a ChartServer. I'm guessing all the servlet context stuff is handled properly in the *Comp object. Everything works just fine now.
  15. I though I would add the appropriate portion of the stacktrace: SEVERE: Servlet.service() for servlet Faces Servlet threw exceptionjava.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.faces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:198) at com.sun.faces.el.impl.ArraySuffix.setValue(ArraySuffix.java:212) at com.sun.faces.el.impl.ComplexValue.setValue(ComplexValue.java:191) at com.sun.faces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:216) at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:413) at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1019) at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1046) at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:761) at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:451) at com.softwarefx.jsf.internal.l.doStartTag(SourceFile:27) at org.apache.jsp.plot.FrequencyDistChart_jsp._jspx_meth_cfx_005fchartserver_005f0(FrequencyDistChart_jsp.java:263)
×
×
  • Create New...