Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Graph bar in kanban

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
graphkanbancardbarodoo
2 Răspunsuri
2736 Vizualizări
Imagine profil
Uzair

i have made a graph in kanban the colour of the graph is light gray by default if there is data inside my widget is widget="dashboard_graph", but i want to change the colour to light blue if there is data i did not find any widget my code is below:

Colonization
Property Types
Property Stages
0
Imagine profil
Abandonează
Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

Hi,

If you are using the widget "dashboard_graph" and you need change the color of the graph, then you may need to check the JS file of the widget and you can patch the js file and change the color in it. The Js file is "JournalDashboardGraphField" you can search for this class in the JS file and make the changes.

You can refer to our below blog to get idea on patching a component in js https://www.cybrosys.com/blog/how-to-patch-existing-owl-component-in-odoo-17


Hope it helps

0
Imagine profil
Abandonează
Imagine profil
Shajahan
Cel mai bun răspuns

To change the color of a graph in an Odoo Kanban view based on whether there is data or not, you can achieve this by customizing the CSS styles of the graph widget based on the presence of data. Since there's no built-in widget for this specific requirement, you'll need to use custom JavaScript and CSS.

Here's a general approach to accomplish this:

  1. Identify the Graph Element: First, you'll need to identify the HTML element of the graph widget in your Kanban view. You can do this by inspecting the page source in your web browser.
  2. Add Custom JavaScript: Write JavaScript code to check if there is data present in the graph widget. This can involve querying the data and analyzing its presence.
  3. Update CSS Styles: Based on the presence or absence of data, dynamically update the CSS styles of the graph widget to change its color accordingly.

Here's a simplified example of how you might implement this:

javascriptCopy codeodoo.define('your_module_name.custom_dashboard_graph', function (require) {
    "use strict";

    var KanbanView = require('web.KanbanView');

    KanbanView.include({
        // Override the `render` method to add custom logic
        render: function () {
            var self = this;
            this._super.apply(this, arguments);
            
            // Check if there is data in the graph widget
            // For simplicity, let's assume `this` refers to the Kanban view element
            var $graphWidget = this.$('.o_dashboard_graph');
            var hasData = ... // Your logic to check if data is present

            // Update CSS styles based on data presence
            if (hasData) {
                $graphWidget.css('background-color', 'lightblue');
            } else {
                $graphWidget.css('background-color', 'lightgray');
            }
        },
    });
});

Please note that this is a simplified example, and you'll need to adjust it based on your specific requirements and the structure of your Odoo module. You may also need to handle asynchronous data loading if applicable.

Remember to replace 'your_module_name' with the actual name of your Odoo module.

Additionally, you may need to consider browser compatibility and other factors while implementing custom JavaScript and CSS in Odoo. Testing thoroughly across different browsers and devices is recommended.

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
how to invisible graph bar in kanban Rezolvat
graph kanban invisible card bar
Imagine profil
Imagine profil
2
mai 24
2129
Show measure value on odoo graph without hovering.
graph bar odoo piechart
Imagine profil
Imagine profil
1
aug. 23
3045
Pass values ​​from one stage to another in kanban view, odoo 14[SOLVED] Rezolvat
kanban odoo
Imagine profil
Imagine profil
1
iun. 23
3473
How to extend the setup of a kanban component and pass data to a new form in Odoo? Rezolvat
kanban odoo OWL
Imagine profil
1
dec. 23
3322
How to have multiple bars per item on the x-axis on graph view?
development graph bar
Imagine profil
Imagine profil
Imagine profil
2
sept. 23
12372
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now