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

How to customize chartist beyond options? #39

Open
minusf opened this issue Jan 14, 2019 · 0 comments
Open

How to customize chartist beyond options? #39

minusf opened this issue Jan 14, 2019 · 0 comments

Comments

@minusf
Copy link
Collaborator

minusf commented Jan 14, 2019

Is there a way to inject in the current js something like labelInterpolationFnc for chartist?

https://gionkunz.github.io/chartist-js/api-documentation.html:

// In addition to the regular options we specify responsive option overrides
// that will override the default configutation based on the matching media queries.
var responsiveOptions = [
  ['screen and (min-width: 641px) and (max-width: 1024px)', {
    showPoint: false,
    axisX: {
      labelInterpolationFnc: function(value) {
        // Will return Mon, Tue, Wed etc. on medium screens
        return value.slice(0, 3);
      }
    }
  }],
  ['screen and (max-width: 640px)', {
    showLine: false,
    axisX: {
      labelInterpolationFnc: function(value) {
        // Will return M, T, W etc. on small screens
        return value[0];
      }
    }
  }]
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant