• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DefaultKeyedValues2DDataset类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jfree.data.general.DefaultKeyedValues2DDataset的典型用法代码示例。如果您正苦于以下问题:Java DefaultKeyedValues2DDataset类的具体用法?Java DefaultKeyedValues2DDataset怎么用?Java DefaultKeyedValues2DDataset使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DefaultKeyedValues2DDataset类属于org.jfree.data.general包,在下文中一共展示了DefaultKeyedValues2DDataset类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getJChartDataset

import org.jfree.data.general.DefaultKeyedValues2DDataset; //导入依赖的package包/类
private DefaultKeyedValues2DDataset getJChartDataset() {
    DefaultKeyedValues2DDataset dataset = new DefaultKeyedValues2DDataset();
    buildPDSfromTable(); // update the PDS
    PopulationDatasetsEntry[] ageGroups = pds.getAgeGroups();
    Arrays.sort(ageGroups, new Comparator<PopulationDatasetsEntry>() {
        @Override
        public int compare(PopulationDatasetsEntry o1, PopulationDatasetsEntry o2) {
            return o2.getAgeGroup() - o1.getAgeGroup();
        }
    });
    for (PopulationDatasetsEntry entry : ageGroups) {
        String label = java.util.ResourceBundle.getBundle("canreg/client/gui/dataentry/resources/PDSEditorInternalFrame").getString("FEMALE");
        int count = entry.getCount();
        entry.getAgeGroup();
        if (entry.getSex() == 1) {
            count = -count;
            label = java.util.ResourceBundle.getBundle("canreg/client/gui/dataentry/resources/PDSEditorInternalFrame").getString("MALE");
        }
        dataset.addValue(count, label, ageGroupLabelsTable.getValueAt(entry.getAgeGroup(), 0).toString());
    }
    return dataset;
}
 
开发者ID:IARC-CSU,项目名称:CanReg5,代码行数:23,代码来源:PDSEditorInternalFrame.java


示例2: makePlot

import org.jfree.data.general.DefaultKeyedValues2DDataset; //导入依赖的package包/类
@Override
protected Plot makePlot(final JFreeChartBuilder.PlotParameters parameters) {

    final DefaultKeyedValues2DDataset tmpDataset = this.getDataset();

    final CategoryAxis tmpCategoryAxis = this.makeCategoryAxis(domain);

    final ValueAxis tmpValueAxis = this.makeValueAxis(range);

    final StackedBarRenderer tmpRenderer = new StackedBarRenderer();
    tmpRenderer.setBarPainter(new StandardBarPainter());
    tmpRenderer.setShadowVisible(false);

    if (this.isTooltips()) {
        tmpRenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
    }
    if (this.isUrls()) {
        tmpRenderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator());
    }

    this.setColours(tmpRenderer, tmpDataset);

    final CategoryPlot retVal = new CategoryPlot(tmpDataset, tmpCategoryAxis, tmpValueAxis, tmpRenderer);
    retVal.setOrientation(parameters.getOrientation());
    retVal.setBackgroundPaint(parameters.getBackground());
    retVal.setOutlinePaint(parameters.getOutline());

    return retVal;
}
 
开发者ID:optimatika,项目名称:ojAlgo-extensions,代码行数:30,代码来源:StackedBarChartBuilder.java


示例3: makePlot

import org.jfree.data.general.DefaultKeyedValues2DDataset; //导入依赖的package包/类
@Override
protected Plot makePlot(final JFreeChartBuilder.PlotParameters parameters) {

    final DefaultKeyedValues2DDataset tmpDataset = this.getDataset();

    final CategoryAxis tmpCategoryAxis = this.makeCategoryAxis(domain);

    final NumberAxis tmpValueAxis = this.makeValueAxis(range);

    final BarRenderer tmpRenderer = new BarRenderer();
    tmpRenderer.setBarPainter(new StandardBarPainter());
    tmpRenderer.setShadowVisible(false);
    if (this.isTooltips()) {
        tmpRenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
    }
    if (this.isUrls()) {
        tmpRenderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator());
    }

    this.setColours(tmpRenderer, tmpDataset);

    final CategoryPlot retVal = new CategoryPlot(tmpDataset, tmpCategoryAxis, tmpValueAxis, tmpRenderer);
    retVal.setOrientation(parameters.getOrientation());
    retVal.setBackgroundPaint(parameters.getBackground());
    retVal.setOutlinePaint(parameters.getOutline());

    return retVal;
}
 
开发者ID:optimatika,项目名称:ojAlgo-extensions,代码行数:29,代码来源:BarChartBuilder.java


示例4: updateChart

import org.jfree.data.general.DefaultKeyedValues2DDataset; //导入依赖的package包/类
private void updateChart() {
    DefaultKeyedValues2DDataset dataset = getJChartDataset();
    chart = ChartFactory.createStackedBarChart(
            nameTextField.getText(),
            java.util.ResourceBundle.getBundle("canreg/client/gui/dataentry/resources/PDSEditorInternalFrame").getString("AGE_GROUP"), // domain axis label
            sourceTextField.getText(), // range axis label
            dataset, // data
            PlotOrientation.HORIZONTAL, //orientation
            true, // include legend
            true, // tooltips
            false // urls
    );
}
 
开发者ID:IARC-CSU,项目名称:CanReg5,代码行数:14,代码来源:PDSEditorInternalFrame.java


示例5: initializeChart

import org.jfree.data.general.DefaultKeyedValues2DDataset; //导入依赖的package包/类
/**
 * @see ch.unibe.iam.scg.archie.ui.charts.AbstractChartComposite#initializeChart()
 */
@Override
protected JFreeChart initializeChart() {
	JFreeChart chart = ChartFactory.createStackedBarChart(
			PatientsConsHistChart.CHART_TITLE, 
			"Costs of Consultations", // domain axis label
			"Patients", // range axis label
			(DefaultKeyedValues2DDataset) this.creator.getDataset(), // data
			PlotOrientation.HORIZONTAL, 
			true, // include legend
			true, // tooltips
			false // urls
	);
	
	// set tooltip renderer
	CategoryPlot plot = (CategoryPlot) chart.getPlot();
	plot.getRenderer().setBaseToolTipGenerator(new HistogramTooltipGenerator());
	
	// hide tick labels
	CategoryAxis axis = (CategoryAxis) plot.getDomainAxis();
	axis.setTickLabelsVisible(false);
	
	// Set chart background color to it's parents background
	chart.setBackgroundPaint(new Color(this.parent.getBackground().getRed(),
			this.parent.getBackground().getGreen(), this.parent.getBackground().getBlue()));
	
	return chart;
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:31,代码来源:PatientsConsHistChart.java


示例6: initializeChart

import org.jfree.data.general.DefaultKeyedValues2DDataset; //导入依赖的package包/类
/**
 * @see ch.unibe.iam.scg.archie.ui.charts.AbstractChartComposite#initializeChart()
 */
@Override
protected JFreeChart initializeChart() {
	JFreeChart chart = ChartFactory.createStackedBarChart(AgeHistogrammChart.CHART_TITLE, "Age", // domain
			// axis
			// label
			"Patients", // range axis label
			(DefaultKeyedValues2DDataset) this.creator.getDataset(), // data
			PlotOrientation.HORIZONTAL, true, // include legend
			true, // tooltips
			false // urls
			);

	// set tooltip renderer
	CategoryPlot plot = (CategoryPlot) chart.getPlot();
	plot.getRenderer().setBaseToolTipGenerator(new HistogramTooltipGenerator());

	// hide tick labels
	CategoryAxis axis = (CategoryAxis) plot.getDomainAxis();
	axis.setTickLabelsVisible(false);

	// Set chart background color to it's parents background
	chart.setBackgroundPaint(new Color(this.parent.getBackground().getRed(),
			this.parent.getBackground().getGreen(), this.parent.getBackground().getBlue()));

	return chart;
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:30,代码来源:AgeHistogrammChart.java


示例7: getDataset

import org.jfree.data.general.DefaultKeyedValues2DDataset; //导入依赖的package包/类
protected DefaultKeyedValues2DDataset getDataset() {
    return myDataset;
}
 
开发者ID:optimatika,项目名称:ojAlgo-extensions,代码行数:4,代码来源:AbstractData2D.java



注:本文中的org.jfree.data.general.DefaultKeyedValues2DDataset类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Selector类代码示例发布时间:2022-05-22
下一篇:
Java ExcelField类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap