charts icon indicating copy to clipboard operation
charts copied to clipboard

Color Customization - For each bar

Open saru2020 opened this issue 4 years ago • 2 comments

Expected Behaviour

In Bar Chart: Is there a way for me to differentiate the positive & negative values aka defining colour for every single data bar/point? Note: This would be visually appealing for PnL statements.

Actual Behaviour

Screenshot 2021-08-22 at 9 58 31 PM

Steps to Reproduce:

This is configuration code of the chart:

const chart = new frappe.Chart(chartElementId, {  
                title: title,
                data: data,
                type: 'axis-mixed', // or 'bar', 'line', 'scatter', 'pie', 'percentage'
                height: 250,
                colors: ['#7cd6fd'],
                axisOptions: {
                    xIsSeries: true // default: false
                },
                // lineOptions: {
                //     hideDots: 1 // default: 0
                // }
            })

Frappé Charts version: 1.6.2

saru2020 avatar Aug 22 '21 16:08 saru2020

I think there is no way for that for now. Correct me if i am wrong . Maybe in future update they will put this feature

cap-code avatar Jun 10 '22 04:06 cap-code

👋 I have a similar problem, I'm making a line chart that displays hourly price data (the x axis is 0-23 hrs) and would like to outline the current hour in a different color. I guess there is a similar limitation as on the bar chart?

khromov avatar Jul 31 '22 17:07 khromov