小编Aru*_*ath的帖子

如何在google api图表的折线图中增加注释字体大小和粗体注释值?

我正在使用带有注释的谷歌api折线图.如何更改字体大小和字体格式?

<script type="text/javascript">
                google.load("visualization", "1", {packages: ["corechart"]});
                google.setOnLoadCallback(drawChart);
                function drawChart() {
                    var data = new google.visualization.DataTable();
                    data.addColumn('string', '');
                    data.addColumn({type: 'string', role: 'annotation'});
                    data.addColumn('number', '');
                    data.addRows([['2010', '67', 67]]);
                    data.addRows([['2011', '69', 69]]);
                    data.addRows([['2012', '68', 68]]);
                    data.addRows([['2013', '67', 67]]);

                    var options = {
                        width: 350,
                        height: 250,
                        pointSize: 5,                           
                        legend: {position: 'none'},
                        chartArea: {
                            left: 0,
                            top: 60,
                            width: 300,
                            height: 75},
                        vAxis: {
                            baselineColor: '#fff',
                            gridlines: {color: '#fff'},
                            minValue: 64,
                            maxValue: 71
                        },
                        tooltip: {trigger: 'none'},
                        enableInteractivity: false,
                        annotation: {
                            1: { …
Run Code Online (Sandbox Code Playgroud)

javascript google-api google-visualization

7
推荐指数
1
解决办法
1万
查看次数

PhantomJS崩溃了 - 致命的Windows异常,代码0xc0000005

我们使用EmberJS构建了一个应用程序.当我们使用测试应用程序时,我们收到了失败消息ember test.在这里我提到了错误消息

操作系统:Windows 8(64位)PhantomJS:2.1.1

PhantomJS - error
    ---
        message: >
            Error:          
            Non-zero exit code: 3221225477
            Stderr:
             Fatal Windows exception, code 0xc0000005.
            PhantomJS has crashed. Please read the bug reporting guide at
            <http://phantomjs.org/bug-reporting.html> and file a bug report.


        Log: |
            { type: 'error', text: 'Error: Browser exited unexpectedly' }
            { type: 'error', text: 'Non-zero exit code: 3221225477' }
            { type: 'error',
              text: 'Fatal Windows exception, code 0xc0000005.\r\nPhantomJS has crashed. Please read the bug reporting guide at\r\n<http://phantomjs.org/bug-reporting.html> and file a …
Run Code Online (Sandbox Code Playgroud)

node.js phantomjs ember.js npm-install

6
推荐指数
1
解决办法
3402
查看次数

如何在Google API图表的折线图笔划中显示点值?

我在Google API图表中使用折线图。在此图表中,我需要在point上方显示vaxis值。但是我正在使用批注。它在haxis附近创建点值。但是我需要在point之上。

实际图表:

在此处输入图片说明

预期图表:

在此处输入图片说明

    <script type="text/javascript">
                google.load("visualization", "1", {packages: ["corechart"]});
                google.setOnLoadCallback(drawChart);
                function drawChart() {

                    var data = new google.visualization.DataTable();
                    data.addColumn('string', 'Year');
                    data.addColumn('number', 'Sales');
                    data.addColumn({type: 'number', role: 'annotation'});

                    data.addRows([
                        ['2008', 23, 23],
                        ['2009', 145, 145],
                        ['2010', 245, 245],
                        ['2011', 350, 350]
                    ]);                

                    var options = {
                        width: 400,
                        height: 100,
                        pointSize: 4,
                        legend: {position: 'none'},
                        chartArea: {
                            left: 0,
                            top: 10,
                            width: 400,
                            height: 50},
                        vAxis: {
                            baselineColor: '#fff',
                            gridlines: {color: 'transparent'}
                        },
                        tooltip: {trigger: 'none'},
                        annotation: {
                            1: {
                                style: …
Run Code Online (Sandbox Code Playgroud)

javascript google-api google-visualization

5
推荐指数
1
解决办法
7894
查看次数

如何删除谷歌api图表折线图中的注释刻度线?

我在google api的折线图中得到了这张图表.

在此输入图像描述

在这里,我试图在点上方显示点值.所以我正在使用注释.这里是如何删除谷歌api图表中的点(23和2008,145和2009 ...)之间的注释刻度标记.

<script type="text/javascript">
        google.load("visualization", "1", {packages: ["corechart"]});
        google.setOnLoadCallback(drawChart);
        function drawChart() {

            var data = new google.visualization.DataTable();
            data.addColumn('string', 'Year');                
            data.addColumn({type: 'number', role: 'annotation'}); 
            data.addColumn('number', 'Sales');

            data.addRows([
                ['2008', 23, 54],
                ['2009', 145, 55],
                ['2010', 245, 56],
                ['2011', 350, 57]
            ]);               
            var options = {
                width: 400,
                height: 200,
                pointSize: 4,
                legend: {position: 'none'},
                chartArea: {
                    left: 0,
                    top: 60,                        
                    width: 400,
                    height: 50},
                vAxis: {
                    baselineColor: '#fff',
                    gridlines: {color: 'transparent'},                        
                        maxValue:'58',
                        minValue:'52'                                  
                },                    
                tooltip: {trigger: 'none'},
                annotation: {
                    1: …
Run Code Online (Sandbox Code Playgroud)

javascript annotations google-api google-visualization

5
推荐指数
2
解决办法
5028
查看次数

如何删除jfree图表-圆环图中的分隔线

我正在使用 Jfreechart 创建圆环图。我想删除分隔线(即绿色部分和白色部分之间的线)-这条线超出了图表部分。我需要将其限制为图表宽度。

以下是实际和预期图表: 在此处输入图片说明

在此添加的图像中,您可以清楚地看到图表饼图外的扩展分节线。(以蓝色圆圈标记)。我需要摆脱那条延长线,分节线不应超出实际的饼图区域。

任何人都可以帮助我实现这些目标。

下面是我正在使用的代码:

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import javax.swing.JPanel;

import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PiePlotState;
import org.jfree.chart.plot.RingPlot;
import org.jfree.data.general.DefaultPieDataset;
import org.jfree.data.general.PieDataset;
import org.jfree.text.TextUtilities;
import org.jfree.ui.ApplicationFrame;
import org.jfree.ui.RectangleInsets;
import org.jfree.ui.RefineryUtilities;
import org.jfree.ui.TextAnchor;
public class DonutChart extends ApplicationFrame {

    private static final long serialVersionUID = 1L;

    static class CustomRingPlot extends RingPlot {

        private Font centerTextFont;    
        private Color centerTextColor;

        public CustomRingPlot(PieDataset dataset) {
            super(dataset);
            this.centerTextFont = new Font(Font.SANS_SERIF, Font.BOLD, 24);
            this.centerTextColor = Color.BLACK; …
Run Code Online (Sandbox Code Playgroud)

java jfreechart

3
推荐指数
1
解决办法
992
查看次数