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

Use rangeMin and rangeMax in all charts if defined in model (instead of using dataMin by default) #236

Merged

Conversation

simonsymhoven
Copy link
Member

@simonsymhoven simonsymhoven commented Jun 8, 2022

Using rangeMin and rangeMax from chartModel instead of using 'dataMin' by default in yAxis in configurable-trend-chart.js and trend-chart.js.

I have already submitted an issue in the echarts-build-trends repository. I have looked at this again more closely and find out, that the rangeMin and rangeMax property is ignored for the configurable trend charts.

I tested the changes locally and using the following setup now:

/* Use 'dataMax' as range max.
 model.setRangeMax(Math.max(
        Math.max(createRangeMaxFor(dataSet, ReportSeriesBuilder.ACCURATE),
                createRangeMaxFor(dataSet, ReportSeriesBuilder.MANUALLY)),
        createRangeMaxFor(dataSet, ReportSeriesBuilder.INCORRECT)) + 10);
 */

// Use zero instead of 'dataMin' range min.
model.setRangeMin(0);

and setting the model with:

echartsJenkinsApi.renderConfigurableZoomableTrendChart

Result:

Bildschirmfoto 2022-06-08 um 13 28 44

The same problem was observed for the pre defined job trend charts. I also updated the js file for the trend-result.

Result:

Bildschirmfoto 2022-06-08 um 14 10 58

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@uhafner uhafner added the bug Bugs or performance problems label Jun 9, 2022
@uhafner uhafner changed the title Add min and max for yAxis from chartModel rangeMin/rangeMax instead of using 'dataMin' by default Use rangeMin and rangeMax in all charts if set in model (instead of using dataMin by default) Jun 9, 2022
@uhafner uhafner changed the title Use rangeMin and rangeMax in all charts if set in model (instead of using dataMin by default) Use rangeMin and rangeMax in all charts if defined in model (instead of using dataMin by default) Jun 9, 2022
@uhafner uhafner merged commit f58630a into jenkinsci:master Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs or performance problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants