<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    學用Java

    奇新Java控件---Java控件提供商和Java RIA, Web, J2ME解決方案開發商

    介紹JComponentPack產品中的JBasicChart圖表控件

    Use JBasicChart in JComponentPack


    JBasicChart provides a basic chart component.
    It could draw 3 styles graph, for example: PIE, LINE, BAR.

    The following code demonstrates how to use JBasicChart.
    JBasicChart basicChart = new JBasicChart();
    basicChart.setModel(createBasicChartModel());
    basicChart.setChartType(ChartType.BAR);

    private BasicChartModel createBasicChartModel_() {
            double[] yaxis = {1.000, 3.000, 2, 4, 0, 3.000, 0.000, 0.000, -5.000, 4.000, 3.000};
            int[] xaxis = {200701, 200612, 200611, 200610, 200609, 200608, 200607, 200606,200605, 200604, 200603};
            DefaultBasicChartModel model = new DefaultBasicChartModel();
            model.addSeries("a", yaxis);
            for (int i = 0; i < xaxis.length; i++) {
                model.setCategoryName("" + xaxis[i], i);
            }
            return model;
    }

    It is easy to use JBasicChart, you could use method setModel(model) to change the data which displayed on the chart, and also you could use method setChartType(type) to change the style of the chart, the parameter type is one of the three values(ChartType.BAR、ChartType.LINE、ChartType.PIE).

    To change the data of the chart, you should learn more about DefaultBasicChartModel.
    addSeries(String name, double[] values),this method add a series values which will be y-axis value, each value have a category name, use the method setCategoryName(String name, int categoryIndex) to set it.
    addSeries(String name, double[] values, int index),when you saw this method, you should know this model could add multi-series values to it.

    It also have some other methods which are easy to use, for example:
    getCategoryCount()
    getCategoryName(int categoryIndex)
    getSeriesCount()
    getSeriesName(int seriesIndex)
    removeSeries(int index)
    etc.

    For more information, please see DefaultBasicChartModel and JBasicChart.

    posted on 2009-02-21 18:18 fralepg 閱讀(323) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    <2009年2月>
    25262728293031
    1234567
    891011121314
    15161718192021
    22232425262728
    1234567

    導航

    統計

    公告

    JComponentPack 3.0正式發布 功能介紹

    JComponentPack 是一個基于Java SwingGUI類庫,一系列可視化的JavaBeans集合,它基于SwingMVC架構,是100%的純Java類庫,它包括20多個Swing 所沒有的控件

    試用版下載(點擊下載

    常用鏈接

    留言簿(1)

    隨筆檔案

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 日本一区二区免费看| 亚洲欧美成人一区二区三区| 曰韩无码AV片免费播放不卡| 亚洲黄色一级毛片| 久久久国产精品福利免费| 国产亚洲精品国看不卡| 美女扒开屁股让男人桶爽免费 | 桃子视频在线观看高清免费视频| 国产成人精品曰本亚洲79ren| 色吊丝性永久免费看码| 国产日产亚洲系列最新| baoyu777永久免费视频| 图图资源网亚洲综合网站| 99re在线这里只有精品免费| 亚洲福利电影一区二区?| 最近免费中文字幕大全免费| 亚洲人色大成年网站在线观看| 日韩免费一区二区三区在线播放| 久久狠狠爱亚洲综合影院| 日韩伦理片电影在线免费观看| 亚洲永久精品ww47| 你懂的免费在线观看网站| 亚洲高清无在码在线电影不卡| 97免费人妻无码视频| 亚洲精品av无码喷奶水糖心| 亚洲福利视频一区二区| 国产精品亚洲精品观看不卡| 宅男666在线永久免费观看| fc2免费人成在线视频| 亚洲国产精品第一区二区| 国产人在线成免费视频| 黄色网址在线免费观看| 亚洲国产精品无码久久久不卡 | 丰满亚洲大尺度无码无码专线| 亚洲国产成人精品女人久久久 | 18禁成人网站免费观看| 亚洲乱色熟女一区二区三区蜜臀| www亚洲精品少妇裸乳一区二区| 中文字幕乱码一区二区免费| 亚洲高清最新av网站| 日日麻批免费40分钟无码|