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

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

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

    學(xué)用Java

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

    介紹JComponentPack產(chǎn)品中的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 閱讀(318) 評論(0)  編輯  收藏


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


    網(wǎng)站導(dǎo)航:
     
    <2009年2月>
    25262728293031
    1234567
    891011121314
    15161718192021
    22232425262728
    1234567

    導(dǎo)航

    統(tǒng)計

    公告

    JComponentPack 3.0正式發(fā)布 功能介紹

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

    試用版下載(點(diǎn)擊下載

    常用鏈接

    留言簿(1)

    隨筆檔案

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 国产啪精品视频网免费| 国内少妇偷人精品视频免费| 一个人看的www在线观看免费| 亚洲高清免费在线观看| 99热在线免费播放| 亚洲日韩乱码中文无码蜜桃臀 | 国产女高清在线看免费观看| 亚洲同性男gay网站在线观看| 久草免费在线观看视频| 亚洲国产精品线观看不卡| 亚洲精品视频免费看| 亚洲午夜电影在线观看| 成人女人A级毛片免费软件| 亚洲一线产区二线产区区| 日韩激情淫片免费看| 日本永久免费a∨在线视频| MM131亚洲国产美女久久| 在线免费观看h片| 91在线亚洲精品专区| 免费人成在线视频| 欧美亚洲国产SUV| 久久亚洲欧洲国产综合| 久久中文字幕免费视频| 亚洲一级视频在线观看| 国产高清视频在线免费观看| 天堂亚洲免费视频| 久久精品国产精品亚洲毛片| 久久久久国色AV免费看图片| 国产亚洲精品2021自在线| 亚洲精品无码久久久久| 青娱乐免费在线视频| 无码的免费不卡毛片视频| 亚洲第一福利网站| 在线观看免费大黄网站| 中文字幕成人免费高清在线视频| 久久久久久亚洲AV无码专区| 国产又长又粗又爽免费视频| 日韩免费在线视频| 亚洲变态另类一区二区三区| 亚洲自偷自偷在线制服| 最近中文字幕免费mv视频7|