OERP (ODOO9) How to make a default legend selected in the graph - odoo

How to make a default legend selected in the graph while it open ,
in my code i have used default odoo graph view and now i am getting that all the legends are selected by default in this i need only one legend should be selected by default remaining legends should be unselected
enter image description here

You will need to customise the widget that operates on the graph view that interests you, override the widget's start function, search using jquery the element and send an onclick event to it.
The widget that you need to override is named web.GraphView on v9. For instructions on how to extend a widgets functionality refer to the documentation according to your version of odoo.

Related

How to modify custom.css styling on Docusaurus items

I am looking for the syntax needed to reference an item in Docusaurus allowing me to modify the background color/text color of a collapsed item.
Example image
enter image description here
How exactly can I reference docusaurus code to modify the coloring of these bubbles?
it is not clear what exactly you are asking.
You can find how to add styling and layout here: https://docusaurus.io/docs/styling-layout
You can create custom react components and add them to the documentation to completely customise the html element. Alternatively you could inspect the element to find the class used by docusaurus to change the css of the elements you want.

How to add a tick symbol to AutoCompleteTextView item suggestion?

I already have a AutoCompleteTextView with custom layout and adapter. How can I control the visibility of a tick symbol next to each item to show if the item has already been added? By added I mean, it's compared with another list that's fetched from storage that I compare with the AutoCompleteTextView suggestions?
What do you mean is an Exposed Dropdown Menus, available in the latest material design library.
Please read the documentation about how to implement it: https://material.io/develop/android/components/menu/
What I needed to do was to have the tick icon in the custom layout be View.INVISIBLEby default. Then in the getView() method of the custom adapter, change the visibility according to the requirement for that specific situation. The point is, the getView() method is responsible for any changes to related to the UI of the items.

How to extend the Image plugin in ckeditor5 with custom elements?

We're evaluating an upgrade from ckeditor 4 to the new ckeditor 5, but I need to be able to extend the Image plugin/package with some custom elements, e.g. a text input for licensing information about the image, a button/checkbox for toggling the image to be a thumbnail or not etc.
How can I add these custom elements in the image package and write my own javascript code to handle the values from these elements?
The image toolbar is being controlled by the config.image.toolbar property. It accepts names of UI components registered in the editor.ui.components factory. In other words, it works like the main editor toolbar which is configurable via editor.toolbar and you can learn more how to create buttons here: Creating a simple plugin.

In ngx-Charts, How to make tooltips always appear? Instead of appear on mouse-over and then disappear?

I am trying to build the stacked bar graph using ngx-charts in angular 4.x. While displaying the data labels, I am using tooltip template and able to display, but I want those labels to show up always (instead on only on mouse-over).
How I can achieve this in ngx-charts?
You can use the boolean [showDataLabel]="showDataLabel"

Click even on pie chart using dojo

I have a sliced pie chart.
I need to implement Click event on each slice to go other page.
Can any body tel me how to do this kind of clicks on the pie chart using dojo?
You should use actions for that. Read this article (linked from the official docs): http://www.sitepen.com/blog/2008/05/27/dojo-charting-event-support-has-landed/
As always you can look at the code for standard actions in dojox/charting/action2d.