frappe / charts

Simple, responsive, modern SVG Charts with zero dependencies
https://frappe.io/charts
MIT License
14.94k stars 718 forks source link

[Feature request] More color and customization #23

Closed chintan9 closed 6 years ago

chintan9 commented 6 years ago

It should have more color customization.

It also should have addons also.

achillesrasquinha commented 6 years ago

With respect to color customisations, we use a color palette dedicated for http://github.com/frappe/frappe. We're working on rewriting the styles to SASS, will take a note of color customisations there

What sort of addons?

chintan9 commented 6 years ago

for more type visualization.

What sort of addons?

achillesrasquinha commented 6 years ago

You mean more charts?

chintan9 commented 6 years ago

yes

PatNeedham commented 6 years ago

From the Create a Chart instructions:

  // Javascript
  let data = {
    labels: ["12am-3am", "3am-6am", "6am-9am", "9am-12pm",
      "12pm-3pm", "3pm-6pm", "6pm-9pm", "9pm-12am"],

    datasets: [
      {
        title: "Some Data", color: "light-blue",
        values: [25, 40, 30, 35, 8, 52, 17, -4]
      },
      {
        title: "Another Set", color: "violet",
        values: [25, 50, -10, 15, 18, 32, 27, 14]
      },
      {
        title: "Yet Another", color: "blue",
        values: [15, 20, -3, -15, 58, 12, -17, 37]
      }
    ]
  };
...

What if the color prop from title: "Some Data", color: "light-blue", could also accept hex and RGB values like title: "Some Data", color: "#91D4F9",?

Trying that currently makes the color become black:

image

ghost commented 6 years ago

Some simple overlay patterns for color blind would be appreciated.

pratu16x7 commented 6 years ago

Color is surely a desired overhaul; we need to be able to allow for hex codes for more flexibility #47

gpfunk commented 6 years ago

Hey, thanks for the cool lib. I just submitted a PR which hopefully helps with this feature #71. Let me know if its along the right tracks.

pratu16x7 commented 6 years ago

We'll be doing a release shortly that resolves hex colors, thanks to @gpfunk.

pratu16x7 commented 6 years ago

Released. @PatNeedham Hex codes should be usable now. @chintan9 Regarding the customisation request, please open a new issue that details the specifics. @CamusAran Will look forward to including defaults for Deuteranopia, Protanopia, and Tritanopia, created a new issue for this (#76) Thanks!