Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually setting color sets using JSON-based config not working #577

Closed
davidliang2008 opened this issue Nov 19, 2018 · 2 comments
Closed
Assignees

Comments

@davidliang2008
Copy link

Based the JSON-based config tutorial, it looks like you can set a hard-coded list of colors globally for the chart: https://www.amcharts.com/docs/v4/concepts/json-config/#Structure_of_JSON_config

{
  "colors": {
    "list": ["#ff0000", "#00ff00", "#0000ff" ]
  }
}

There is also a documentation stating you can assign colors to the series: https://www.amcharts.com/docs/v4/concepts/colors/#Manually_setting_color_sets

{
  // ...
  "series": [{
    // ...
    "colors": [{
      "#845EC2",
      "#D65DB1",
      "#FF6F91",
      "#FF9671",
      "#FFC75F",
      "#F9F871"
    }]
  }]
}

Both cases don't override the default color set.

demo: http://jsfiddle.net/aq9Laaew/274847/

@martynasma martynasma self-assigned this Nov 19, 2018
@martynasma martynasma added bug in next release Implemented. Available soon. docs labels Nov 19, 2018
@martynasma
Copy link
Collaborator

Thanks for the heads up.

Looks like there are two issues: documentation is wrong and there's a bug that prevents it from working :)

I updated the docs. It should say this:

{
  // ...
  "series": [{
    // ...
    "colors": {
      "list": [
        "#845EC2",
        "#D65DB1",
        "#FF6F91",
        "#FF9671",
        "#FFC75F",
        "#F9F871"
      ]
    }
  }]
}

Also, fixed bug in dev version. New version will be released within 1-2 days.

Will ping you once that happens.

@martynasma
Copy link
Collaborator

Fixed in 4.0.0-beta.85.

[4.0.0-beta.85] - 2018-11-20

Added

  • "ready" event added to Sprite. Sprite fires it right after "init" event. Container fires it when all of its children are ready.
  • system.isPaused property added. Setting it to true will effectively pause any chart activity, making them completely static.
  • ErrorBullet class added. Allows drawing error charts. (Check error-chart and xy-error-chart examples for code samples)
  • JSON: String-based cursorOverStyle and cursorDownStyle are not supported.

Fixed

  • JSON: Setting ColorSet properties baseColor or list was not working properly.
  • Accessibility: Legend item was not properly referring to a Series via labelled-by.
  • Label.wrap was breaking lines mid-word even if there where words that would fit into alotted space.
  • Memory leak fixed.
  • Sometimes Animation was not firing "animationended" event (when elastic easing was used).

Full change log.

Make sure you clear your browser cache after upgrading. And feel free to contact us again if you are still experiencing this issue.

@martynasma martynasma removed the in next release Implemented. Available soon. label Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants