UNPKG

billboard.js

Version:

Re-usable easy interface JavaScript chart library, based on D3 v4+

303 lines (272 loc) 4.92 kB
/*! * Copyright (c) 2017 ~ present NAVER Corp. * billboard.js project is licensed under the MIT license * * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * * @version 3.14.2 */ /*-- Chart --*/ .bb svg { font: 10px sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .bb path, .bb line { fill: none; stroke: #000; } .bb text, .bb .bb-button { -webkit-user-select: none; -moz-user-select: none; user-select: none; } .bb-legend-item-tile, .bb-xgrid-focus, .bb-ygrid-focus, .bb-ygrid { shape-rendering: crispEdges; } .bb-chart-arcs .bb-needle { fill: #000; } .bb-chart-arc .bb-gauge-value { fill: #000; } .bb-chart-arc path { stroke: #fff; } .bb-chart-arc rect { stroke: #fff; stroke-width: 1; } .bb-chart-arc text { fill: #fff; font-size: 13px; } /*-- Funnel --*/ .bb-chart-funnels path { stroke-width: 0; } .bb-chart-funnels + .bb-chart-texts text { font-size: 13px; fill: #fff; } /*-- Axis --*/ .bb-axis { shape-rendering: crispEdges; } .bb-axis .bb-axis-x-tooltip, .bb-axis .bb-axis-y-tooltip, .bb-axis .bb-axis-y2-tooltip { font-size: 1em; fill: #fff; white-space: nowrap; } /*-- Grid --*/ .bb-grid { pointer-events: none; } .bb-grid line { stroke: #aaa; } .bb-grid text { fill: #aaa; } .bb-xgrid, .bb-ygrid { stroke-dasharray: 3 3; } /*-- Text on Chart --*/ .bb-text.bb-empty { fill: #808080; font-size: 2em; } /*-- Line --*/ .bb-line { stroke-width: 1px; } /*-- Point --*/ .bb-circle._expanded_ { stroke-width: 1px; stroke: white; } .bb-selected-circle { fill: white; stroke-width: 2px; } /*-- Bar --*/ .bb-bar { stroke-width: 0; } .bb-bar._expanded_ { fill-opacity: 0.75; } /*-- Candlestick --*/ .bb-candlestick { stroke-width: 1px; } .bb-candlestick._expanded_ { fill-opacity: 0.75; } /*-- Focus --*/ .bb-target.bb-focused, .bb-circles.bb-focused { opacity: 1; } .bb-target.bb-focused path.bb-line, .bb-target.bb-focused path.bb-step, .bb-circles.bb-focused path.bb-line, .bb-circles.bb-focused path.bb-step { stroke-width: 2px; } .bb-target.bb-defocused, .bb-circles.bb-defocused { opacity: 0.3 !important; } .bb-target.bb-defocused .text-overlapping, .bb-circles.bb-defocused .text-overlapping { opacity: 0.05 !important; } /*-- Region --*/ .bb-region { fill: steelblue; } .bb-region rect { fill-opacity: 0.1; } /*-- Zoom region --*/ .bb-zoom-brush { fill-opacity: 0.1; } /*-- Brush --*/ .bb-brush .extent { fill-opacity: 0.1; } /*-- Legend --*/ .bb-legend-item { font-size: 12px; user-select: none; } .bb-legend-item-hidden { opacity: 0.15; } .bb-legend-background { opacity: 0.75; fill: white; stroke: lightgray; stroke-width: 1; } /*-- Title --*/ .bb-title { font: 14px sans-serif; } /*-- Treemap --*/ .bb-chart-treemaps rect { stroke: #fff; stroke-width: 1px; } /*-- Tooltip --*/ .bb-tooltip-container { z-index: 10; user-select: none; } .bb-tooltip { border-collapse: collapse; border-spacing: 0; background-color: #fff; empty-cells: show; opacity: 0.9; box-shadow: 7px 7px 12px -9px rgb(119, 119, 119); white-space: nowrap; } .bb-tooltip tr { border: 1px solid #CCC; } .bb-tooltip th { background-color: #aaa; font-size: 14px; padding: 2px 5px; text-align: left; color: #FFF; } .bb-tooltip td { font-size: 13px; padding: 3px 6px; background-color: #fff; border-left: 1px dotted #999; } .bb-tooltip td > span, .bb-tooltip td > svg { display: inline-block; width: 10px; height: 10px; margin-right: 6px; } .bb-tooltip.value { text-align: right; } /*-- Area --*/ .bb-area { stroke-width: 0; opacity: 0.2; } /*-- Arc --*/ .bb-chart-arcs-title { dominant-baseline: middle; font-size: 1.3em; } text.bb-chart-arcs-gauge-title { dominant-baseline: middle; font-size: 2.7em; } .bb-chart-arcs { /*-- Polar --*/ } .bb-chart-arcs .bb-chart-arcs-background { fill: #e0e0e0; stroke: #fff; } .bb-chart-arcs .bb-chart-arcs-gauge-unit { fill: #000; font-size: 16px; } .bb-chart-arcs .bb-chart-arcs-gauge-max { fill: #777; } .bb-chart-arcs .bb-chart-arcs-gauge-min { fill: #777; } .bb-chart-arcs .bb-levels circle { fill: none; stroke: #848282; stroke-width: 0.5px; } .bb-chart-arcs .bb-levels text { fill: #848282; } /*-- Radar --*/ .bb-chart-radars .bb-levels polygon { fill: none; stroke: #848282; stroke-width: 0.5px; } .bb-chart-radars .bb-levels text { fill: #848282; } .bb-chart-radars .bb-axis line { stroke: #848282; stroke-width: 0.5px; } .bb-chart-radars .bb-axis text { font-size: 1.15em; cursor: default; } .bb-chart-radars .bb-shapes polygon { fill-opacity: 0.2; stroke-width: 1px; } /*-- Button --*/ .bb-button { position: absolute; top: 10px; right: 10px; } .bb-button .bb-zoom-reset { font-size: 11px; border: solid 1px #ccc; background-color: #fff; padding: 5px; border-radius: 5px; cursor: pointer; }