<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 閱讀(317) 評論(0)  編輯  收藏


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


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

    導航

    統計

    公告

    JComponentPack 3.0正式發布 功能介紹

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

    試用版下載(點擊下載

    常用鏈接

    留言簿(1)

    隨筆檔案

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 免费看国产精品麻豆| 国产精品亚洲不卡一区二区三区| 国产午夜亚洲精品国产| 亚洲&#228;v永久无码精品天堂久久| 一级做α爱过程免费视频 | 久久久久亚洲av无码专区导航| 免费观看美女用震蛋喷水的视频 | 亚洲国产精品成人精品小说| 国产免费私拍一区二区三区| 三上悠亚在线观看免费| 亚洲成年人电影在线观看| 四虎影视精品永久免费| 日韩插啊免费视频在线观看| 亚洲成a人无码亚洲成av无码 | 亚洲精品线在线观看| 免费观看男人免费桶女人视频| 久久久久久国产a免费观看不卡| 亚洲乱码日产精品BD在线观看| 亚洲国产精品嫩草影院久久 | 久久久精品免费视频| 亚洲精品9999久久久久无码| 亚洲精品tv久久久久久久久| 女人张开腿给人桶免费视频| 亚洲免费精彩视频在线观看| 国产天堂亚洲精品| 亚洲成av人片在线看片| 亚洲综合最新无码专区| 毛片免费观看的视频在线| 久久免费精彩视频| 人人鲁免费播放视频人人香蕉| 亚洲乱码一区av春药高潮| 国产亚洲成av片在线观看| 国产成人精品男人免费| 日本XXX黄区免费看| 日韩av无码免费播放| 美女免费视频一区二区| 亚洲1234区乱码| 亚洲尹人九九大色香蕉网站| 亚洲综合激情另类专区| 国产精品免费看久久久无码| 久久国产免费福利永久|