I'm starting to learn vue but I can't figure out how to customize a Chart with vue chartkick. What I want to do is to pass default options to change the default style of the charts, let's say I want a different cutoutPercentage, with Charts.js we can set:
Chart.defaults.doughnut.cutoutPercentage = 10;
But this doesn't seem to work with chartkick, I created this Pen to play around but I cannot figured it out, any ideas?
chart kick allows you to pass the library options to the chart, using :library
<pie-chart :data="[['Blueberry', 44], ['Strawberry', 23]]" :donut="true" :library="{cutoutPercentage: 20}"></pie-chart>
https://codepen.io/BoyWithSilverWings/pen/YadXNO
Related
I created a custom widget using angular 10, Now I wanted to add a datapoint list in the configuration(edit) and access it
I am using c8y-data-point-list directive but my angular application not able to find this selector/associated component.
so my first question is how to use the existing angularJs component in angular? how to import it?
is it possible?
I also want to use more widget in a custom widget from ng1-module, how to achieve it?
c8y-data-point-list is not in the official list of cumulocity components, so it's not possible to use it.
Also the highest version of angular would be the 8th, as they currently only support it and still use angularJS components.
I am using vue-apexcharts in my vuejs project. I have around 15 pages where I am using charts and I want to change the font family everywhere. How to achieve this generically? Is there any general approach to change the fonts all together?
https://apexcharts.com/docs/options/chart/fontfamily/
This is the example where it's written how to change it in a specific way.
You can set global options just after you've imported and registered vue-apexcharts.
import VueApexCharts from "vue-apexcharts";
Vue.use(VueApexCharts);
window.Apex.chart = { fontFamily: "MuseoModerno, Arial, sans-serif" };
This will then be applied to all charts.
Of course, remember that you'll also need to make sure that the font is globally available in your Vue project by for example importing it.
I'm using the VueJS Vuetify framework and I need a pagination option with more features then the basic one available.
what am i looking for:
an option to add custom names (not just numbers)
a tooltip over the buttons
to disable/enable just some of the buttons
pagination - meaning: use next, previous and "..." if there are too many pages
if the pagination had a template option (slot) that would of been perfect.
now i am wondering how is the best why to get my goal. is there a way to add templates to vuetify? is there a different component that has this options on the pagination?
Read the api here In answer to your questions:
1+2+3 This is not supported in vuetify out of the box and therefore you may want to consider writing your own pagination tool or looking for a different package.
4. This can be set in the props as described in the docs above, see total-visible prop and length.
The basic example of snackbar for Material Design Components for Web doesn't work. It produces the error:
```
TypeError: snackbar.show is not a function
```
I have tried using jQuery to make sure the DOM loaded properly. I have tried changing back and forth the javascript initialisation methods, but none seems to work.
You can find the code here: https://jsbin.com/mejefeq/edit?html,console,output
I have read the docs over and overs again, but none of it mentioned anything about this. Since this MDC for Web is not at all popular, I have nowhere left to go for help.
Yeah that was a breaking change in the 0.43.0 update. The new way of showing the snackbar is by using
snackbar.open();
This however will just open the snackbar. If you want to change the text in the snackbar you can use:
snackbar.labelText = 'Your new text';
So together you can use them:
snackbar.labelText = 'Your new text';
snackbar.open();
You can check out more of the documentation here, with the current javascript properties and events here
I have this requirement where I have to change the default styles on my Ext JS application. I am not talking about changing stuff in CSS files yet. I am not that ambitious yet. Here is what I am looking for:
Suppose I need a Submit and Cancel buttons, I use xtype:button and text:Save ( or Cancel ). This will render buttons with the text on them. What should I do if I want to change the look and feel of the button? Or replace the button with a cool Save or Cancel image?
Right now I have all the texts on the application with the default font that ExtJS shows. What am I supposed to do if I want all the text on the application changed to a different font? Everything right from the data in forms/grids and the titles of each component should be changed to some other font my customer prefers. What am I supposed to do?
I understand these are very basic and a generic questions, but I am looking for a good headsup before I proceed with my task.
Thank you all in advance. Waiting for answers :)
Update: So, I found out how we deal with CSS and change the fonts. Can anyone help about the Chaning the look and feel for Submit/Cancel buttons.
I recommend you to use SASS and compass to build your own themes, or better said to change one the existing themes. In the Ext JS documentation you can find the css variables which you can set according to your needs.
If you are not ready for theming with SASS just yet take a look at this example of button configs from the sencha docs:
Stanadalone Example page: http://docs.sencha.com/extjs/4.1.3/extjs-build/examples/button/button.html
CSS that adds customized images to the buttons: http://docs.sencha.com/extjs/4.1.3/extjs-build/examples/button/button.css
JS that shows button configs: http://docs.sencha.com/extjs/4.1.3/extjs-build/examples/button/button.js
Essentially this shows how to use iconCls property on the button config along with a simple CSS class to add desired image to your button.