forked from chartist-js/chartist
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added scale (linear, log) option to AutoScaleAxis.
- Loading branch information
Showing
3 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
new Chartist.Line('.ct-chart', { | ||
series: [[ | ||
{x: 1, y: 11000}, | ||
{x: 2, y: 5000}, | ||
{x: 4, y: 300}, | ||
{x: 8, y: 12.5}, | ||
{x: 16, y: 1.25}, | ||
{x: 32, y: 0.25}, | ||
{x: 100, y: 0.0625}, | ||
]] | ||
}, { | ||
axisX: { | ||
type: Chartist.AutoScaleAxis, | ||
onlyInteger: true, | ||
scale: 'log2' | ||
}, | ||
axisY: { | ||
type: Chartist.AutoScaleAxis, | ||
onlyInteger: false, | ||
scale: 'log10' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4ddd949
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Looks fantastic! I'll give it a test run ASAP and also add some basic axes tests on a new branch. Could you then add some tests to this branch? Thanks for your contribution!
4ddd949
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make a PR for this? We can work together on that. Cheers