Search found 21 matches

by gw1500se
Mon Aug 27, 2018 7:13 pm
Forum: JFreeChart
Topic: Restricting ToolTipText to Chart Line Only
Replies: 3
Views: 1436

Re: Restricting ToolTipText to Chart Line Only

Thanks for the reply. Would this be "instead of" or "in addition to?"
by gw1500se
Mon Aug 27, 2018 2:13 pm
Forum: JFreeChart
Topic: Restricting ToolTipText to Chart Line Only
Replies: 3
Views: 1436

Restricting ToolTipText to Chart Line Only

I have the following for displaying a tool tip at specific locations on a Timeline Series chart. class ToolTipChart extends ChartPanel { /** * */ private static final long serialVersionUID = 1L; public ToolTipChart(JFreeChart chart) { super(chart); } @Override public String getToolTipText(MouseEvent...
by gw1500se
Tue Jun 12, 2018 3:43 pm
Forum: JFreeChart
Topic: Is a Discontinuous Plot Possible?
Replies: 1
Views: 985

Is a Discontinuous Plot Possible?

I have a real-time time series plot that is working fine. However, there are situations where the input for the y values are "turned off". That is, no data is added to the time series but the time should continue. Later the input would be "turned on" again. Is it possible to add a time data point wi...
by gw1500se
Wed Jun 06, 2018 4:52 pm
Forum: JFreeChart
Topic: Font Size Changes When Creating Image
Replies: 0
Views: 1047

Font Size Changes When Creating Image

I have a chart that contains markers with labels in 10 pt font. I create an image to be added to an itextpdf document: float sizeX=page.getHeight(); float sizeY=page.getWidth(); float scale=.68f; float marginY=10.f; PdfContentByte cb=writer.getDirectContent(); PdfTemplate tp=cb.createTemplate(sizeX*...
by gw1500se
Wed Jun 06, 2018 2:03 pm
Forum: JFreeChart
Topic: Cannot Label Vertical Marker
Replies: 5
Views: 1626

Re: Cannot Label Vertical Marker

I think I have it. I'm using getRange() instead.
by gw1500se
Wed Jun 06, 2018 1:46 pm
Forum: JFreeChart
Topic: Cannot Label Vertical Marker
Replies: 5
Views: 1626

Re: Cannot Label Vertical Marker

I printed out the values and indeed there is apparently a problem with the getMaxY method. It seems to be returning the min value not the max. At the time of the marker execution the y-axis range is ~70-93 and getMaxY returned 71 when it should have returned 93. Interestingly, getMinY returns the sa...
by gw1500se
Tue Jun 05, 2018 7:09 pm
Forum: JFreeChart
Topic: Cannot Label Vertical Marker
Replies: 5
Views: 1626

Re: Cannot Label Vertical Marker

Thanks for the reply. The chart is updated in real time so the bounds for the time is dynamic and starts with minutes and could go on for hours. Thus the scale will shrink over time. The y-axis is also dynamic and may start at <100 but over time will not exceed 300. Is it not the y-axis that is the ...
by gw1500se
Tue Jun 05, 2018 4:16 pm
Forum: JFreeChart
Topic: Cannot Label Vertical Marker
Replies: 5
Views: 1626

Cannot Label Vertical Marker

I created a method to add a marker on a time series plot with a label. The marker works fine but I cannot get the label to show up. public void addMarker(String id_,String name_) { Functions.logger("Adding open door marker for "+id_+" "+name_,false); Long tod=new Date().getTime(); ValueMarker marker...
by gw1500se
Fri Dec 08, 2017 2:07 pm
Forum: JFreeChart
Topic: Left Scale Label Being Clipped
Replies: 3
Views: 1473

Re: Left Scale Label Being Clipped

Thanks, that worked. However, how did you know what parameters to use? I looked through the documentation and it mentioned setting and getting insets in various places but I found nothing on what insets actually are/do.
by gw1500se
Thu Dec 07, 2017 4:42 pm
Forum: JFreeChart
Topic: Left Scale Label Being Clipped
Replies: 3
Views: 1473

Left Scale Label Being Clipped

I have a working chart but the first (left) tick label is being clipped on the left side.

https://ibb.co/g4wFkG

Perhaps this is a bug since scaling the width does not help. How do I get the chart moved slightly right so the label is not clipped? TIA.
by gw1500se
Fri Dec 01, 2017 1:01 pm
Forum: JFreeChart
Topic: JFreeChart Image and Itext 7
Replies: 3
Views: 1700

Re: JFreeChart Image and Itext 7

Thanks for the reply. I was concerned that if I throw JFreeChart in to the mix they would send me here. I'll give it a try.
by gw1500se
Thu Nov 30, 2017 5:00 pm
Forum: JFreeChart
Topic: JFreeChart Image and Itext 7
Replies: 3
Views: 1700

JFreeChart Image and Itext 7

I am migrating my app from Itext 5 to Itext 7. However, I can only find examples of images for Itext 5. Can someone tell me how to change this to Itext 7? PdfContentByte cb=writer.getDirectContent(); PdfTemplate tp=cb.createTemplate(sizeX*scale+1,sizeY*scale+1); PdfGraphics2D g2d=new PdfGraphics2D(c...
by gw1500se
Fri Nov 24, 2017 4:50 pm
Forum: JFreeChart
Topic: Adding JFreeChart to Itextpdf in Landscape
Replies: 12
Views: 3972

Re: Adding JFreeChart to Itextpdf in Landscape

Thanks. I've been looking for one but there doesn't seem to be any.
by gw1500se
Fri Nov 24, 2017 3:07 pm
Forum: JFreeChart
Topic: Adding JFreeChart to Itextpdf in Landscape
Replies: 12
Views: 3972

Re: Adding JFreeChart to Itextpdf in Landscape

Arggg! This is so frustrating. After hours of fiddling with various parameters I am finally getting the chart to display the way I want but no matter what I try I cannot position it. This is my current code: Document document = new Document(PageSize.A4.rotate()); Font titleFont = new Font(FontFamily...
by gw1500se
Thu Nov 23, 2017 4:09 pm
Forum: JFreeChart
Topic: Sizing and Locating a JFreeChart with ItextPDF
Replies: 3
Views: 1299

Re: Sizing and Locating a JFreeChart with ItextPDF

Thanks. I don't know where to go from here but I guess I'll just play with the parameters until something different happens.