小编Mik*_*ike的帖子

highchart获得系列颜色和标记

我想在显示数据的表格旁边显示折线图系列的颜色和标记.我没有手动设置颜色.

如何通过JavaScript获取系列颜色和标记?

javascript colors

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

工具提示中的高图总计

我正在使用此代码显示共享工具提示:

tooltip: {
    crosshairs: true,
    shared: true,
    headerFormat: 'KW {point.key}<table>',
    pointFormat: '<tr><td style=\"color: {series.color}\">{series.name}: <b></td><td>{point.y} USD</b></td></tr>',
    useHTML: true,
    footerFormat: '</table>',
    valueDecimals: 2
},
Run Code Online (Sandbox Code Playgroud)

现在我想将所有point.y值添加为该点的总值.但是我如何循环每个系列的point.y来计算总价值呢?

tooltip highcharts

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

highcharts:获得yaxis头衔?

我有一个2 yaxis的图表,我想在工具提示格式化程序中获得每个系列的yaxis标题.

这是我的格式化函数:

formatter: function() {
    var s = '<b>'+  Highcharts.dateFormat('$hc_date_long', this.x) +'</b><table>';
    sum = 0;
    var abweichung = 0;
    var stellen = 0;
    $.each(this.points, function(i, point) {
        var prev = jQuery.inArray(point.x, point.series.processedXData)-1;
        var percent = 0;
        if(prev>=0){
            prev = point.series.points[prev];
            percent = (point.y - prev.y) * 100 / point.y;
        }
        s += '<tr><td style=\"color: '+point.series.color+';padding:2px;\">'+ point.series.name +':</td><td style=\"text-align:right;padding:2px;\"> '+ extround(point.y,100) +' !!GETYAXISTITLE!!</td><td style=\"text-align:right;padding:2px;\">'+percent+'</td></tr>';
        sum += point.y;
    });
    s += '</table>';
     return s;
},
Run Code Online (Sandbox Code Playgroud)

api只包含函数"setTitle()"没有getTitle()函数?

javascript highcharts

4
推荐指数
2
解决办法
8190
查看次数

Java开始两个线程?

我是java的新手.我有两个类看起来像:

public class hsClient implements Runnable {

  public void run() {
    while(true){
    }
  }
}

public class hsServer implements Runnable {

  public void run() {
    while(true){
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

如果我尝试以Thread开始这两个类,它将不会启动第二个线程.看起来他陷入了第一个.

这是我的主要课程:

public static void main(String[] args) throws IOException {
        hsClient client = new hsClient();
        Thread tClient = new Thread(client);
        tClient.run();
        System.out.println("Start Client");
        hsServer server = new hsServer();
        Thread tServer = new Thread(server);
        tServer.run();
        System.out.println("Start Server");
}
Run Code Online (Sandbox Code Playgroud)

如果我运行我的代码,它只在控制台上打印"Start Client"而不是"Start Server"

java runnable

2
推荐指数
1
解决办法
92
查看次数

标签 统计

highcharts ×2

javascript ×2

colors ×1

java ×1

runnable ×1

tooltip ×1