zoukankan      html  css  js  c++  java
  • highcharts

    var chart = new Highcharts.Chart({
    credits: {
    enabled: false
    },
    chart: {
    renderTo: "trendChart",
    type: "spline", //显示类型
    plotBorderWidth: 2, //主图表边框宽度
    zoomType: "xy" //拖动鼠标放大图表的方向
    },
    title: {
    text: ""
    },
    tooltip: {
    // shared: true,
    formatter: function(params) {
    if (this.series.name.indexOf("率") > -1) {
    return "" +
    this.series.name +
    " " +
    this.x +
    ": " +
    ((Highcharts.numberFormat(this.y, 4, ".", ",") * 100).toFixed(2) +
    "%");
    } else if (
    this.series.name == "收入" ||
    this.series.name == "CPC" ||
    this.series.name == "ecpm"
    ) {
    return "" +
    this.series.name +
    " " +
    this.x +
    ": " +
    Highcharts.numberFormat(this.y, 2, ".", ",");
    } else {
    return "" +
    this.series.name +
    " " +
    this.x +
    ": " +
    Highcharts.numberFormat(this.y, 0, ".", ",");
    }
    }
    },

    colors: colors.length > 0 ? colors : ["#50B432", "#058DC7"],
    xAxis: {
    categories: categories,
    reversed: true
    },
    yAxis: yaxis,
    plotOptions: {
    spline: {
    lineWidth: 2,
    states: {
    hover: {
    lineWidth: 3
    }
    },
    marker: {
    enabled: categories.length > 10 ? false : true
    }
    },
    },
    series: series
    });

  • 相关阅读:
    java基础知识复习
    红黑二叉查找树(原理、实现)
    Django admin
    redis+sentinel 安装与配置
    浅谈saltstack
    python3 通过smtplib模块发送邮件
    django 自定义分页模块
    chouti项目
    Django 进阶篇二
    Django 进阶篇
  • 原文地址:https://www.cnblogs.com/amandaff/p/7919238.html
Copyright © 2011-2022 走看看