Jump to content
Software FX Community

mcstoufer

Members
  • Posts

    42
  • Joined

  • Last visited

Posts posted by mcstoufer

  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. 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);

  5. 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.

  6. 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.

  7.  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

  8. 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?

  9. 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)

  10.  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)
  11.  I worked through this some more and added code to resolve the context, request, and response objects that are passed the the ChartServer() init method.

    I also added a call to the renderControl() method of the chartserver object after it was all setup.

     Now I'm getting a java.lang.IllegalArgumentException: series is out of range  error from com.softwarefx.sfxnet.internal.fu.<init>(SourceFile:15) that is triggered by this call.

     I'm really stumped.

  12. I couldn't find any examples in any of the Samples directory of the Trial download. Plenty of JSF stuff. Can Software FX post some?

     I'm also having trouble with getting my existing JSP calling the chartserver tag. It seems that the backing bean is working just fine and is generating what appears to be a valid chartserver object. However, the page fails to render when it comes to display. I get a java.lang.IllegalArgumentException: argument type mismatch error at java.lang.reflect.Method.invoke(Method.java:597)  when the following tag gets evaluated.

    <p>Am I missing additional tags here? I'm guessing the request/response parameters aren't visible somewhere.</p>

     <cfx:chartserver width="800" id="freqDistChart" height="325" binding="#{FrequencyDistManagedBean.chartComp}"/>

  13. Roughly,

      Set your current major gridlines as minor gridlines with a spacing of n/2 where n is the interval currently being displayed. Make their color and tick mark both the same color as your plotting area background. This will hide them but still render the minor axis labels. Then turn on your minor axes and set them to the color that is currently displayed. No labels are requied on these new minors.

     

    Good luck. 

  14. When the y-axis is rendered in log(10) format, I cannot successfully hide what appears to the be minor gridlines. If in fact these are major gridlines, how do I display gridlines that only have a label associated with them?

     Code snippet as follows:

    SoftwareFX.ChartFX.Axis yAxis = rankBar.getAxisY();yAxis.setGridlines(true);yAxis.setMinorGridlines(false);yAxis.setMinorTickMark(TickMark.NONE);yAxis.setLogBase(10);yAxis.getGrid().setColor(new java.awt.Color(230, 230, 230));yAxis.getGrid().setStyle(4);yAxis.getLabelsFormat().setDecimals((short) 0);yAxis.getLabelsFormat().setFormat(AxisFormat.NUMBER); 

×
×
  • Create New...