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

Wrong display with a custom scale when all values are positive #70

Open
ronenl opened this issue Jun 8, 2015 · 0 comments
Open

Wrong display with a custom scale when all values are positive #70

ronenl opened this issue Jun 8, 2015 · 0 comments

Comments

@ronenl
Copy link

ronenl commented Jun 8, 2015

I configured the options like this:
$scope.chartOptions = {
scaleOverride: true,
scaleStartValue: -100,
scaleSteps: 10,
scaleStepWidth: 20
};

When the chart has mixed positive and negative values the chart looks OK,
but when all the values are positive the chart looks like this:
image

the values are:
[
{
"StartDate": "/Date(1433106000000)/",
"EndDate": "/Date(1433192400000)/",
"StartDateFormatted": "1",
"EndDateFormatted": "2",
"Performance": 3.37662337662
},
{
"StartDate": "/Date(1433192400000)/",
"EndDate": "/Date(1433278800000)/",
"StartDateFormatted": "2",
"EndDateFormatted": "3",
"Performance": 6.70125378297
},
{
"StartDate": "/Date(1433278800000)/",
"EndDate": "/Date(1433365200000)/",
"StartDateFormatted": "3",
"EndDateFormatted": "4",
"Performance": 1.0989010989
},
{
"StartDate": "/Date(1433365200000)/",
"EndDate": "/Date(1433451600000)/",
"StartDateFormatted": "4",
"EndDateFormatted": "5",
"Performance": 5.05737356566
},
{
"StartDate": "/Date(1433451600000)/",
"EndDate": "/Date(1433538000000)/",
"StartDateFormatted": "5",
"EndDateFormatted": "6",
"Performance": 0.76335877863
},
{
"StartDate": "/Date(1433538000000)/",
"EndDate": "/Date(1433624400000)/",
"StartDateFormatted": "6",
"EndDateFormatted": "7",
"Performance": 4.50077599586
},
{
"StartDate": "/Date(1433624400000)/",
"EndDate": "/Date(1433710800000)/",
"StartDateFormatted": "7",
"EndDateFormatted": "8",
"Performance": 5.26315789474
},
{
"StartDate": "/Date(1433710800000)/",
"EndDate": "/Date(1433797200000)/",
"StartDateFormatted": "8",
"EndDateFormatted": "9",
"Performance": 0.25839793282
}
]

The values are starting from the bottom of the chart instead of starting from the zero line.

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