eztech-core-components 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,45 @@
1
+ <script>
2
+ import { Bar } from 'vue-chartjs'
3
+ export default {
4
+ name: 'BarChart',
5
+ extends: Bar,
6
+ props: {
7
+ data: {
8
+ type: Object,
9
+ required: false,
10
+ default: () => { return null }
11
+ },
12
+ options: {
13
+ type: Object,
14
+ required: false,
15
+ default: () => ({
16
+ responsive: true,
17
+ maintainAspectRatio: false,
18
+ legend: {
19
+ display: true
20
+ },
21
+ scales: {
22
+ yAxes: [{
23
+ ticks: {
24
+ fontColor: 'rgb(75, 85, 99)'
25
+ }
26
+ }],
27
+ xAxes: [{
28
+ ticks: {
29
+ fontColor: 'rgb(75, 85, 99)'
30
+ }
31
+ }]
32
+ }
33
+ })
34
+ }
35
+ },
36
+ watch: {
37
+ data () {
38
+ this.renderChart(this.data, this.options)
39
+ }
40
+ },
41
+ mounted () {
42
+ this.renderChart(this.data, this.options)
43
+ }
44
+ }
45
+ </script>
@@ -0,0 +1,55 @@
1
+ <script>
2
+ import { Line } from 'vue-chartjs'
3
+ export default {
4
+ name: 'LineChart',
5
+ extends: Line,
6
+ props: {
7
+ data: {
8
+ type: Object,
9
+ required: false,
10
+ default: () => { return null }
11
+ },
12
+ options: {
13
+ type: Object,
14
+ required: false,
15
+ default: () => ({
16
+ responsive: true,
17
+ maintainAspectRatio: false,
18
+ legend: {
19
+ display: true
20
+ },
21
+ interaction: {
22
+ mode: 'index',
23
+ intersect: false
24
+ },
25
+ scales: {
26
+ yAxes: [{
27
+ ticks: {
28
+ fontColor: 'rgb(75, 85, 99)',
29
+ suggestedMin: 30,
30
+ suggestedMax: 50
31
+ }
32
+ }],
33
+ xAxes: [{
34
+ ticks: {
35
+ fontColor: 'rgb(75, 85, 99)'
36
+ }
37
+ }]
38
+ },
39
+ title: {
40
+ display: false,
41
+ text: ''
42
+ }
43
+ })
44
+ }
45
+ },
46
+ watch: {
47
+ data () {
48
+ this.renderChart(this.data, this.options)
49
+ }
50
+ },
51
+ mounted () {
52
+ this.renderChart(this.data, this.options)
53
+ }
54
+ }
55
+ </script>
@@ -0,0 +1,40 @@
1
+ <script>
2
+ import { Pie } from 'vue-chartjs'
3
+ export default {
4
+ name: 'PieChart',
5
+ extends: Pie,
6
+ props: {
7
+ data: {
8
+ type: Object,
9
+ required: false,
10
+ default: () => { return null }
11
+ },
12
+ options: {
13
+ type: Object,
14
+ required: false,
15
+ default: () => ({
16
+ responsive: true,
17
+ maintainAspectRatio: false,
18
+ legend: {
19
+ position: 'bottom',
20
+ labels: {
21
+ // fontColor: 'rgb(75, 85, 99)',
22
+ }
23
+ },
24
+ title: {
25
+ display: false,
26
+ text: ''
27
+ }
28
+ })
29
+ }
30
+ },
31
+ watch: {
32
+ data () {
33
+ this.renderChart(this.data, this.options)
34
+ }
35
+ },
36
+ mounted () {
37
+ this.renderChart(this.data, this.options)
38
+ }
39
+ }
40
+ </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eztech-core-components",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -9,6 +9,7 @@
9
9
  "module": "index.js",
10
10
  "files": [
11
11
  "assets",
12
+ "charts",
12
13
  "comps",
13
14
  "directives",
14
15
  "middleware",
@@ -33,6 +34,7 @@
33
34
  "license": "MIT",
34
35
  "dependencies": {
35
36
  "axios": "^0.30.0",
37
+ "chart.js": "^2.9.4",
36
38
  "vue": "^2.7.10",
37
39
  "vue-chartjs": "^3.5.1",
38
40
  "vue-cropperjs": "^4.2.0"