Completed Tooltip

This commit is contained in:
cmack 2020-08-10 16:06:52 +01:00
parent fea28e8819
commit 932ef5f165
3 changed files with 10 additions and 9 deletions

View File

@ -9,8 +9,6 @@
<link href="https://cdn.jsdelivr.net/npm/remixicon@2.3.0/fonts/remixicon.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/remixicon@2.3.0/fonts/remixicon.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/britecharts/dist/css/britecharts.min.css" type="text/css" />
<link rel='icon' type='image/png' href='/_builder/favicon.png'> <link rel='icon' type='image/png' href='/_builder/favicon.png'>
<link rel='stylesheet' href='/_builder/global.css'> <link rel='stylesheet' href='/_builder/global.css'>
<link rel='stylesheet' href='/_builder/codemirror.css'> <link rel='stylesheet' href='/_builder/codemirror.css'>
@ -25,9 +23,6 @@
<body id="app"> <body id="app">
<script src='/_builder/bundle.js'></script> <script src='/_builder/bundle.js'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.7.4/d3.js"></script>
<script src="https://cdn.jsdelivr.net/npm/britecharts@2/dist/bundled/britecharts.min.js"></script>
</body> </body>
</html> </html>

View File

@ -159,5 +159,11 @@
<div bind:this={chartElement} class={chartClass} /> <div bind:this={chartElement} class={chartClass} />
{#if chartDrawn} {#if chartDrawn}
<Tooltip bind:tooltip {chartDrawn} {chartClass} {data} /> <Tooltip
bind:tooltip
{chartDrawn}
{nameLabel}
{valueLabel}
{chartClass}
{data} />
{/if} {/if}

View File

@ -19,10 +19,10 @@
export let locale = null export let locale = null
export let nameLabel = null export let nameLabel = null
export let numberFormat = null export let numberFormat = null
export let shouldShowDateInTitle = null export let shouldShowDateInTitle = false
export let title = "My tooltip" export let title = "My Tooltip"
export let tooltipOffset = null export let tooltipOffset = null
export let topicLabel = "Topics" export let topicLabel = "values"
export let topicsOrder = null export let topicsOrder = null
export let valueLabel = null export let valueLabel = null
export let xAxisValueType = null export let xAxisValueType = null