add tooltip
This commit is contained in:
parent
c9d796ca69
commit
f193771b63
@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
import { init, use } from 'echarts/core'
|
import { init, use } from 'echarts/core'
|
||||||
import { LineChart } from 'echarts/charts'
|
import { LineChart } from 'echarts/charts'
|
||||||
import { GridComponent } from 'echarts/components'
|
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
|
|
||||||
use([LineChart, GridComponent, CanvasRenderer])
|
use([LineChart, GridComponent, TooltipComponent, CanvasRenderer])
|
||||||
|
|
||||||
|
|
||||||
let isLoaded = false;
|
let isLoaded = false;
|
||||||
|
|||||||
@ -6,9 +6,9 @@ import { Chart } from 'svelte-echarts'
|
|||||||
import { abbreviateNumber } from "$lib/utils";
|
import { abbreviateNumber } from "$lib/utils";
|
||||||
import { init, use } from 'echarts/core'
|
import { init, use } from 'echarts/core'
|
||||||
import { BarChart } from 'echarts/charts'
|
import { BarChart } from 'echarts/charts'
|
||||||
import { GridComponent } from 'echarts/components'
|
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
use([BarChart, GridComponent, CanvasRenderer])
|
use([BarChart, GridComponent, TooltipComponent, CanvasRenderer])
|
||||||
|
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
@ -52,6 +52,11 @@ function getPlotOptions() {
|
|||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
silent: true,
|
silent: true,
|
||||||
|
animation: false,
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
hideDelay: 100, // Set the delay in milliseconds
|
||||||
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: $screenWidth < 640 ? '0%' : '2%',
|
left: $screenWidth < 640 ? '0%' : '2%',
|
||||||
right: $screenWidth < 640 ? '5%' : '2%',
|
right: $screenWidth < 640 ? '5%' : '2%',
|
||||||
|
|||||||
@ -5,10 +5,10 @@
|
|||||||
import { abbreviateNumber, formatDateRange } from "$lib/utils";
|
import { abbreviateNumber, formatDateRange } from "$lib/utils";
|
||||||
import { init, use } from 'echarts/core'
|
import { init, use } from 'echarts/core'
|
||||||
import { LineChart } from 'echarts/charts'
|
import { LineChart } from 'echarts/charts'
|
||||||
import { GridComponent } from 'echarts/components'
|
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
|
|
||||||
use([LineChart, GridComponent, CanvasRenderer])
|
use([LineChart, GridComponent, TooltipComponent, CanvasRenderer])
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
|
|
||||||
@ -97,12 +97,6 @@ function getPlotOptions() {
|
|||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
hideDelay: 100, // Set the delay in milliseconds
|
hideDelay: 100, // Set the delay in milliseconds
|
||||||
backgroundColor: '#202327',
|
|
||||||
axisPointer: {
|
|
||||||
lineStyle: {
|
|
||||||
color: ''
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
animation: false,
|
animation: false,
|
||||||
grid: {
|
grid: {
|
||||||
|
|||||||
@ -5,13 +5,13 @@
|
|||||||
import { Chart } from 'svelte-echarts';
|
import { Chart } from 'svelte-echarts';
|
||||||
import { init, use } from 'echarts/core'
|
import { init, use } from 'echarts/core'
|
||||||
import { BarChart } from 'echarts/charts'
|
import { BarChart } from 'echarts/charts'
|
||||||
import { GridComponent } from 'echarts/components'
|
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
|
|
||||||
// now with tree-shaking
|
// now with tree-shaking
|
||||||
use([BarChart, GridComponent, CanvasRenderer])
|
use([BarChart, GridComponent, TooltipComponent, CanvasRenderer])
|
||||||
|
|
||||||
let isLoaded = false;
|
let isLoaded = false;
|
||||||
|
|
||||||
@ -37,7 +37,6 @@ function normalizer(value) {
|
|||||||
function getPlotOptions() {
|
function getPlotOptions() {
|
||||||
let dates = [];
|
let dates = [];
|
||||||
let enterpriseValue = [];
|
let enterpriseValue = [];
|
||||||
let numberOfShares = [];
|
|
||||||
let marketCapitalization = [];
|
let marketCapitalization = [];
|
||||||
let addTotalDebt = [];
|
let addTotalDebt = [];
|
||||||
let cashEquivalent = [];
|
let cashEquivalent = [];
|
||||||
@ -61,6 +60,10 @@ function getPlotOptions() {
|
|||||||
const option = {
|
const option = {
|
||||||
silent: true,
|
silent: true,
|
||||||
animation: false,
|
animation: false,
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
hideDelay: 100, // Set the delay in milliseconds
|
||||||
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: $screenWidth < 640 ? '0%' : '2%',
|
left: $screenWidth < 640 ? '0%' : '2%',
|
||||||
right: $screenWidth < 640 ? '2%' : '2%',
|
right: $screenWidth < 640 ? '2%' : '2%',
|
||||||
|
|||||||
@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
import { init, use } from 'echarts/core'
|
import { init, use } from 'echarts/core'
|
||||||
import { LineChart } from 'echarts/charts'
|
import { LineChart } from 'echarts/charts'
|
||||||
import { GridComponent } from 'echarts/components'
|
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
|
|
||||||
use([LineChart, GridComponent, CanvasRenderer])
|
use([LineChart, GridComponent, TooltipComponent, CanvasRenderer])
|
||||||
|
|
||||||
let isLoaded = false;
|
let isLoaded = false;
|
||||||
|
|
||||||
|
|||||||
@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
import { init, use } from 'echarts/core'
|
import { init, use } from 'echarts/core'
|
||||||
import { LineChart } from 'echarts/charts'
|
import { LineChart } from 'echarts/charts'
|
||||||
import { GridComponent } from 'echarts/components'
|
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
|
|
||||||
use([LineChart, GridComponent, CanvasRenderer])
|
use([LineChart, GridComponent, TooltipComponent, CanvasRenderer])
|
||||||
|
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
@ -76,6 +76,10 @@ function getPlotOptions() {
|
|||||||
const option = {
|
const option = {
|
||||||
silent: true,
|
silent: true,
|
||||||
animation: false,
|
animation: false,
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
hideDelay: 100, // Set the delay in milliseconds
|
||||||
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: '2%',
|
left: '2%',
|
||||||
right: '2%',
|
right: '2%',
|
||||||
|
|||||||
@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
import { init, use } from 'echarts/core'
|
import { init, use } from 'echarts/core'
|
||||||
import { LineChart } from 'echarts/charts'
|
import { LineChart } from 'echarts/charts'
|
||||||
import { GridComponent } from 'echarts/components'
|
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
|
|
||||||
use([LineChart, GridComponent, CanvasRenderer])
|
use([LineChart, GridComponent, TooltipComponent, CanvasRenderer])
|
||||||
|
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
|
|||||||
@ -6,10 +6,10 @@
|
|||||||
import { abbreviateNumber, formatDateRange } from "$lib/utils";
|
import { abbreviateNumber, formatDateRange } from "$lib/utils";
|
||||||
import { init, use } from 'echarts/core'
|
import { init, use } from 'echarts/core'
|
||||||
import { LineChart, BarChart } from 'echarts/charts'
|
import { LineChart, BarChart } from 'echarts/charts'
|
||||||
import { GridComponent } from 'echarts/components'
|
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
|
|
||||||
use([LineChart, BarChart, GridComponent, CanvasRenderer])
|
use([LineChart, BarChart, GridComponent, TooltipComponent, CanvasRenderer])
|
||||||
|
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
@ -101,6 +101,10 @@ function getPlotOptions() {
|
|||||||
const option = {
|
const option = {
|
||||||
silent: true,
|
silent: true,
|
||||||
animation: false,
|
animation: false,
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
hideDelay: 100, // Set the delay in milliseconds
|
||||||
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: '0%',
|
left: '0%',
|
||||||
right: '0%',
|
right: '0%',
|
||||||
|
|||||||
@ -9,9 +9,9 @@ import { abbreviateNumber } from "$lib/utils";
|
|||||||
import { init, use } from 'echarts/core'
|
import { init, use } from 'echarts/core'
|
||||||
|
|
||||||
import { BarChart } from 'echarts/charts'
|
import { BarChart } from 'echarts/charts'
|
||||||
import { GridComponent } from 'echarts/components'
|
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
use([BarChart, GridComponent, CanvasRenderer])
|
use([BarChart, GridComponent, TooltipComponent, CanvasRenderer])
|
||||||
|
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
@ -58,6 +58,10 @@ function getPlotOptions() {
|
|||||||
const option = {
|
const option = {
|
||||||
silent: true,
|
silent: true,
|
||||||
animation: false,
|
animation: false,
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
hideDelay: 100, // Set the delay in milliseconds
|
||||||
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: $screenWidth < 640 ? '1%' : '2%',
|
left: $screenWidth < 640 ? '1%' : '2%',
|
||||||
right: $screenWidth < 640 ? '0%' : '2%',
|
right: $screenWidth < 640 ? '0%' : '2%',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user