apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.2k stars 19.61k forks source link

Problem with bar chart borders #9900

Closed dimunidze closed 5 years ago

dimunidze commented 5 years ago

General Questions

Issue Type

Issue Details

The problem is that when you click the borders of the bar chart should be painted in red, and painted in yellow, example code: https://codepen.io/dimunidze/pen/NorbOr?editors=0011

The following is an example: 50146279-d7e1e380-02cc-11e9-9d60-d6688818275d

Expected Behavior

After selecting the column, the border is painted in the color that was transmitted.

Current Behavior

Online Example

Topics

Anything Else We Need to Know

Environment

cuijian-dexter commented 5 years ago

You should set barBorderColorinstead of borderColor

        function getDataItemStyle(isSelected: boolean) {
        if(isSelected) {
            const borderProps = {
                barBorderColor: "#ff0000"
            };
            return {opacity: 1, ...borderProps}
        } else {
            return {opacity: 0.5}
        }
    }