Added widget charts, chart extracted from widgets.

This commit is contained in:
woothu
2018-10-11 12:34:59 +02:00
parent 2023248ee2
commit 364c951ef2
26 changed files with 785 additions and 130 deletions
+87 -45
View File
@@ -3,54 +3,81 @@
<b-row>
<b-col sm="6" lg="3">
<widget06 cardClasses="bg-primary" header="9.823" text="Members online" chartType="chart1">
<b-dropdown class="float-right" variant="transparent p-0" right>
<template slot="button-content">
<i class="icon-settings"></i>
</template>
<b-dropdown-item>Action</b-dropdown-item>
<b-dropdown-item>Another action</b-dropdown-item>
<b-dropdown-item>Something else here...</b-dropdown-item>
<b-dropdown-item disabled>Disabled action</b-dropdown-item>
</b-dropdown>
<template slot='dropdown'>
<b-dropdown class="float-right" variant="transparent p-0" right>
<template slot="button-content">
<i class="icon-settings"></i>
</template>
<b-dropdown-item>Action</b-dropdown-item>
<b-dropdown-item>Another action</b-dropdown-item>
<b-dropdown-item>Something else here...</b-dropdown-item>
<b-dropdown-item disabled>Disabled action</b-dropdown-item>
</b-dropdown>
</template>
<template slot='chart'>
<line-chart2 chartId="widget06_1" slot='chart' class='px-3' :data='[65, 59, 84, 84, 51, 55, 40]'
:labels="['January', 'February', 'March', 'April', 'May', 'June', 'July']"
style='height:70px' label='Members'/>
</template>
</widget06>
</b-col>
<b-col sm="6" lg="3">
<widget06 cardClasses="bg-info" header="9.823" text="Members online" chartType="chart2">
<b-dropdown class="float-right" variant="transparent p-0" right no-caret>
<template slot="button-content">
<i class="icon-location-pin"></i>
</template>
<b-dropdown-item>Action</b-dropdown-item>
<b-dropdown-item>Another action</b-dropdown-item>
<b-dropdown-item>Something else here...</b-dropdown-item>
<b-dropdown-item disabled>Disabled action</b-dropdown-item>
</b-dropdown>
<template slot='dropdown'>
<b-dropdown class="float-right" variant="transparent p-0" right no-caret>
<template slot="button-content">
<i class="icon-location-pin"></i>
</template>
<b-dropdown-item>Action</b-dropdown-item>
<b-dropdown-item>Another action</b-dropdown-item>
<b-dropdown-item>Something else here...</b-dropdown-item>
<b-dropdown-item disabled>Disabled action</b-dropdown-item>
</b-dropdown>
</template>
<template slot='chart'>
<line-chart2 chartId="widget06_2" slot='chart' class='px-3' :data='[1, 18, 9, 17, 34, 22, 11]'
:labels="['January', 'February', 'March', 'April', 'May', 'June', 'July']"
style='height:70px' label='Members'/>
</template>
</widget06>
</b-col>
<b-col sm="6" lg="3">
<widget06 cardClasses="bg-warning" header="9.823" text="Members online" chartType="chart3">
<b-dropdown class="float-right" variant="transparent p-0" right>
<template slot="button-content">
<i class="icon-settings"></i>
</template>
<b-dropdown-item>Action</b-dropdown-item>
<b-dropdown-item>Another action</b-dropdown-item>
<b-dropdown-item>Something else here...</b-dropdown-item>
<b-dropdown-item disabled>Disabled action</b-dropdown-item>
</b-dropdown>
<template slot='dropdown'>
<b-dropdown class="float-right" variant="transparent p-0" right>
<template slot="button-content">
<i class="icon-settings"></i>
</template>
<b-dropdown-item>Action</b-dropdown-item>
<b-dropdown-item>Another action</b-dropdown-item>
<b-dropdown-item>Something else here...</b-dropdown-item>
<b-dropdown-item disabled>Disabled action</b-dropdown-item>
</b-dropdown>
</template>
<template slot='chart'>
<line-chart1 chartId="widget06_3" slot='chart' :data='[78, 81, 80, 45, 34, 12, 40]'
:labels="['January', 'February', 'March', 'April', 'May', 'June', 'July']"
style='height:70px' backgroundColor ='rgba(255,255,255,.2)' label='Members'/>
</template>
</widget06>
</b-col>
<b-col sm="6" lg="3">
<widget06 cardClasses="bg-danger" header="9.823" text="Members online" chartType="chart4">
<b-dropdown class="float-right" variant="transparent p-0" right>
<template slot="button-content">
<i class="icon-settings"></i>
</template>
<b-dropdown-item>Action</b-dropdown-item>
<b-dropdown-item>Another action</b-dropdown-item>
<b-dropdown-item>Something else here...</b-dropdown-item>
<b-dropdown-item disabled>Disabled action</b-dropdown-item>
</b-dropdown>
<template name='dropdown'>
<b-dropdown class="float-right" variant="transparent p-0" right>
<template slot="button-content">
<i class="icon-settings"></i>
</template>
<b-dropdown-item>Action</b-dropdown-item>
<b-dropdown-item>Another action</b-dropdown-item>
<b-dropdown-item>Something else here...</b-dropdown-item>
<b-dropdown-item disabled>Disabled action</b-dropdown-item>
</b-dropdown>
</template>
<template name='chart'>
<bar-chart1 chartId="widget06_4" slot='chart' :data='[10, 22, 34, 46, 58, 70, 46, 23, 45, 78, 34, 12]'
label='Members' backgroundColor='rgb(250, 152, 152)' style='height:70px'/>
</template>
</widget06>
</b-col>
</b-row>
@@ -104,20 +131,28 @@
</b-card>
<b-row>
<b-col md="3" sm="6">
<widget04 type="facebook" :dataPoints="[65, 59, 84, 84, 51, 55, 40]"
rightHeader="89k" rightFooter="friends" leftHeader="459" leftFooter="feeds"/>
<widget04 type="facebook" rightHeader="89k" rightFooter="friends" leftHeader="459" leftFooter="feeds">
<line-chart1 chartId="facebook" :data='[0, 22, 34, 46, 58, 70, 68, 58, 52, 60, 64, 70]' label='Friends'
style='height:100px' backgroundColor='rgba(255,255,255,.1)'/>
</widget04>
</b-col>
<b-col md="3" sm="6">
<widget04 type="twitter" :dataPoints="[1, 13, 9, 17, 34, 41, 38]"
rightHeader="973k" rightFooter="followers" leftHeader="1.792" leftFooter="tweets"/>
<widget04 type="twitter" rightHeader="973k" rightFooter="followers" leftHeader="1.792" leftFooter="tweets">
<line-chart1 chartId="twitter" :data='[5, 22, 34, 46, 58, 70, 68, 58, 52, 60, 64, 72]' label='Followers'
style='height:100px' backgroundColor='rgba(255,255,255,.1)'/>
</widget04>
</b-col>
<b-col md="3" sm="6">
<widget04 type="linkedin" :dataPoints="[78, 81, 80, 45, 34, 12, 40]"
rightHeader="500+" rightFooter="contracts" leftHeader="292" leftFooter="feeds"/>
<widget04 type="linkedin" rightHeader="500+" rightFooter="contracts" leftHeader="292" leftFooter="feeds">
<line-chart1 chartId="linkedIn" :data='[15, 22, 34, 46, 58, 70, 68, 58, 52, 60, 64, 71]' label='Contracts'
style='height:100px' backgroundColor='rgba(255,255,255,.1)'/>
</widget04>
</b-col>
<b-col md="3" sm="6">
<widget04 type="google-plus" :dataPoints="[35, 23, 56, 22, 97, 23, 64]"
rightHeader="894" rightFooter="followers" leftHeader="92" leftFooter="circles"/>
<widget04 type='google-plus' rightHeader='894' rightFooter='followers' leftHeader='92' leftFooter='circles'>
<line-chart1 chartId="google-plus" :data='[10, 22, 34, 46, 58, 70, 68, 58, 52, 60, 64, 74]' label='Followers'
style='height:100px' backgroundColor='rgba(255,255,255,.1)'/>
</widget04>
</b-col>
</b-row><!--/.row-->
<b-col md="12">
@@ -369,6 +404,10 @@ import CalloutChartExample from './dashboard/CalloutChartExample'
import { Callout } from '@coreui/vue'
import Widget04 from './widgets/Widget04'
import Widget06 from './widgets/Widget06'
import LineChart1 from './dashboard/LineChart1'
import LineChart2 from './dashboard/LineChart2'
import BarChart1 from './dashboard/BarChart1'
export default {
@@ -379,7 +418,10 @@ export default {
SocialBoxChartExample,
CalloutChartExample,
Widget04,
Widget06
Widget06,
LineChart1,
LineChart2,
BarChart1
},
data: function () {
return {