当前位置: 首页>>代码示例>>Java>>正文


Java ListDataProvider类代码示例

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


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

示例1: init

import com.haulmont.charts.gui.amcharts.model.data.ListDataProvider; //导入依赖的package包/类
@Override
public void init(Map<String, Object> params) {
    ListDataProvider dataProvider = new ListDataProvider();

    dataProvider.addItem(new MapDataItem().add("direction", "N").add("value", 8.0));
    dataProvider.addItem(new MapDataItem().add("direction", "NE").add("value", 9.0));
    dataProvider.addItem(new MapDataItem().add("direction", "E").add("value", 4.5));
    dataProvider.addItem(new MapDataItem().add("direction", "SE").add("value", 3.5));
    dataProvider.addItem(new MapDataItem().add("direction", "S").add("value", 9.2));
    dataProvider.addItem(new MapDataItem().add("direction", "SW").add("value", 8.4));
    dataProvider.addItem(new MapDataItem().add("direction", "W").add("value", 11.1));
    dataProvider.addItem(new MapDataItem().add("direction", "NW").add("value", 10.0));

    RadarChart polarChartConfiguration = (RadarChart) polarChart.getConfiguration();
    polarChartConfiguration.setDataProvider(dataProvider);
}
 
开发者ID:cuba-platform,项目名称:sampler,代码行数:17,代码来源:PolarChartFrame.java

示例2: refreshProjects

import com.haulmont.charts.gui.amcharts.model.data.ListDataProvider; //导入依赖的package包/类
public void refreshProjects() {
    Map<Integer, Map<String, Object>> statisticsByProjects = statisticService.getStatisticsByProjects(
            projectsStart.getValue(), projectsEnd.getValue());
    ListDataProvider dataProvider = new ListDataProvider();
    Set<String> allProjects = new LinkedHashSet<>();
    for (Map.Entry<Integer, Map<String, Object>> entry : statisticsByProjects.entrySet()) {
        MapDataItem mapDataItem = new MapDataItem();
        for (Map.Entry<String, Object> projectsWithSpentTime : entry.getValue().entrySet()) {
            mapDataItem.add(projectsWithSpentTime.getKey(), projectsWithSpentTime.getValue());

            if (!"week".equals(projectsWithSpentTime.getKey())) {
                allProjects.add(projectsWithSpentTime.getKey());
            }
        }
        dataProvider.addItem(mapDataItem);
    }
    SerialChart projectsChartConfiguration = (SerialChart) projectsChart.getConfiguration();
    projectsChartConfiguration.setDataProvider(dataProvider);

    if (projectsChartConfiguration.getGraphs() != null) {
        projectsChartConfiguration.getGraphs().clear();
    }
    Graph[] graphs = new Graph[allProjects.size()];
    int i = 0;
    for (String project : allProjects) {
        Graph projectGraph = new Graph();
        projectGraph.setFillAlphas(0.5);
        projectGraph.setColumnWidth(0.4);
        projectGraph.setLineAlpha(0.7);
        projectGraph.setTitle(project);
        projectGraph.setType(GraphType.COLUMN);
        projectGraph.setValueField(project);
        projectGraph.setBalloonText(project + ": time spent [[" + project + "]] hrs");

        graphs[i] = projectGraph;
        i++;
    }
    projectsChartConfiguration.addGraphs(graphs);
    projectsChart.repaint();
}
 
开发者ID:cuba-platform,项目名称:sample-timesheets,代码行数:41,代码来源:ChartsController.java

示例3: init

import com.haulmont.charts.gui.amcharts.model.data.ListDataProvider; //导入依赖的package包/类
@Override
public void init(Map<String, Object> params) {
    ListDataProvider dataProvider = new ListDataProvider();
    dataProvider.addItem(new EntityDataItem(valueDescription(75, "Sky")));
    dataProvider.addItem(new EntityDataItem(valueDescription(7, "Shady side of pyramid")));
    dataProvider.addItem(new EntityDataItem(valueDescription(18, "Sunny side of pyramid")));

    chart.getConfiguration().setDataProvider(dataProvider);
}
 
开发者ID:cuba-platform,项目名称:sampler,代码行数:10,代码来源:EntityDataItemFrame.java

示例4: init

import com.haulmont.charts.gui.amcharts.model.data.ListDataProvider; //导入依赖的package包/类
@Override
public void init(Map<String, Object> params) {
    ListDataProvider dataProvider = new ListDataProvider();
    dataProvider.addItem(new SimpleDataItem(new ValueDescription(75, "Sky")));
    dataProvider.addItem(new SimpleDataItem(new ValueDescription(7, "Shady side of pyramid")));
    dataProvider.addItem(new SimpleDataItem(new ValueDescription(18, "Sunny side of pyramid")));

    chart.getConfiguration().setDataProvider(dataProvider);
}
 
开发者ID:cuba-platform,项目名称:sampler,代码行数:10,代码来源:SimpleDataItemFrame.java

示例5: init

import com.haulmont.charts.gui.amcharts.model.data.ListDataProvider; //导入依赖的package包/类
@Override
public void init(Map<String, Object> params) {
    ListDataProvider dataProvider = new ListDataProvider();
    dataProvider.addItem(new MapDataItem(
            ParamsMap.of("value", 75, "description", "Sky")));
    dataProvider.addItem(new MapDataItem(
            ParamsMap.of("value", 7, "description", "Shady side of pyramid")));
    dataProvider.addItem(new MapDataItem(
            ParamsMap.of("value", 18, "description", "Sunny side of pyramid")));

    chart.getConfiguration().setDataProvider(dataProvider);
}
 
开发者ID:cuba-platform,项目名称:sampler,代码行数:13,代码来源:MapDataItemFrame.java

示例6: init

import com.haulmont.charts.gui.amcharts.model.data.ListDataProvider; //导入依赖的package包/类
@Override
public void init(Map<String, Object> params) {
    ListDataProvider dataProvider = new ListDataProvider();

    dataProvider.addItem(new MapDataItem().add("title", "New").add("value", 4852));
    dataProvider.addItem(new MapDataItem().add("title", "Returning").add("value", 9899));

    PieChart polarChartConfiguration = (PieChart) donutChart.getConfiguration();
    polarChartConfiguration.setDataProvider(dataProvider);
}
 
开发者ID:cuba-platform,项目名称:sampler,代码行数:11,代码来源:DonutChartFrame.java


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