Skip to content

Use min_value as the lower boundary domain value #32

@qur786

Description

@qur786

@g1eb Can we use minimum value calculated from the data that we process and use them to generate color code generator instead of passing (-0.15 * max_value) as the lower value for the domain.

.attr('fill', d => {
        let color = d3.scaleLinear()
          .range(['#ffffff', this.props.color])
          .domain([-0.15 * max_value, max_value])
        return color(d.total) || '#ff4500'
      })

And can you explain the reason, if any, behind using (-0.15 * max_value) as the lower value in the domain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions