Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7002393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:55:20+00:00 2026-05-27T20:55:20+00:00

JFreeChart seems to be working, except for all the text. It just doesn’t show

  • 0

JFreeChart seems to be working, except for all the text. It just doesn’t show up at all, and I’ve no idea why. I attached a picture of a window with a pie graph that I got from a tutorial site. As you can see, the text isn’t visible. (sorry my twitter feed was really long)

ThanksJFreeChart

Edit:

Here is the code that generates the above graph:

package analyzer_main;

import java.awt.Font;

public class FloatChart extends Composite implements Screen {

    JFreeChart floatChart;

    public FloatChart(Composite parent, int style){
        super(parent,style);
        createContents();
    }

    private void createContents(){
        this.setLayout(new FormLayout());
        floatChart = createChart(createDataset());
        ChartComposite chartComposite = new ChartComposite(this,SWT.NONE,floatChart, true);
        FormData fd_chartComposite = new FormData();
        fd_chartComposite.left  = new FormAttachment(0);
        fd_chartComposite.right = new FormAttachment(100,0);
        fd_chartComposite.top   = new FormAttachment(0);
        fd_chartComposite.bottom= new FormAttachment(100,0);
        chartComposite.setLayoutData(fd_chartComposite);
    }

/** * Creates the Dataset for the Pie chart */

    private PieDataset createDataset() {
        DefaultPieDataset dataset = new DefaultPieDataset();
        dataset.setValue("One", new Double(43.2));
        dataset.setValue("Two", new Double(10.0));
        dataset.setValue("Three", new Double(27.5));
        dataset.setValue("Four", new Double(17.5));
        dataset.setValue("Five", new Double(11.0));
        dataset.setValue("Six", new Double(19.4));
        return dataset;
    }

    private JFreeChart createChart(PieDataset dataset) {

        JFreeChart chart = ChartFactory.createPieChart("Pie Chart Demo 1", // chart
                // title
                dataset, // data
                true, // include legend
                true, false);

        PiePlot plot = (PiePlot) chart.getPlot();
        plot.setSectionOutlinesVisible(false);
        plot.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
        plot.setNoDataMessage("No data available");
        plot.setCircular(false);
        plot.setLabelGap(0.02);
        return chart;
    }

    @Override
    public void Load() {
    }

}

As you can see, it’s pretty much the same as from the tutorial.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:55:21+00:00Added an answer on May 27, 2026 at 8:55 pm

    I was having the same problem using Linux Mint 11, Eclipse, and JFreeChart 1.0.14. I found that backing up to 1.0.13 resolved the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use Jfreechart's bar chart to show data. But in case all data is
I'm using an XYPlot in JFreeChart. All the lines on it are XYSeries objects.
Does JFreeChart work on Blackberry? (Just want to get a quick answer before I
How can I use JFreeChart to display just the most recent data in a
I have created a pie chart in JFreeChart. However, numerical values are not appearing
The JFreeChart XYPlot background color is changed using setBackgroundPaint() but there doesn't seem to
Right now I'm using JFreeChart in order to create a dynamic chart. However the
I am having trouble with setting up the open source library JFreeChart for creating
I'd like to use a different LineAndShapeRenderer for each series on a JFreeChart TimeSeries
I plot a curve with JFreechart. Then the user can draw ranges by dragging

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.