question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I set xMin and xMax?

See original GitHub issue

Hi!

I’m trying to build a multibar chart with the following options:

$scope.options = {
    chart: {
        type: 'multiBarChart',
        forceX: [beginDate.getTime(), endDate.getTime()],
        x: function(d){ return d.getDate().getTime(); },
        y: function(d){ return d.getValue(); },
        showValues: true,
        transitionDuration: 500,
        xAxis: {
            tickFormat: function(d) {
                switch ($scope.quotaPeriod) {
                    case 'YEAR':
                        return $filter('date')(new Date(d), 'MMM, y');
                    default:
                        return $filter('date')(new Date(d), 'mediumDate');
                }
            }
        },
        yAxis: {
            tickFormat: function(d) {
                switch ($scope.quotaType) {
                    case 'BYTE_INPUT':
                        return $filter('format')(d, 'B');
                    default:
                        return $filter('format')(d, '', 'metric');
                }
            }
        }
    }
};

But the begin and end dates are not set by the forceX param. Any idea to make it working?

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:11

github_iconTop GitHub Comments

13reactions
markmssdcommented, Oct 25, 2016

Is there any way to set only e.g. a minY, leaving the maxY dynamic?

0reactions
AnushaputtaUIcommented, Jan 18, 2018

Is there a way to set the maxX and maxX can be dynamic for each different line? @digitalhydra

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set Xmin, Ymin, Xmax, Xmin in graph.C - ROOT Forum
How can we set Xmax, Xmin, Ymax and Ymin values in graph.C file? ... So you can do gr->GetXaxis()->SetLimits(xmin, xmax) and similarly for...
Read more >
matplotlib.pyplot.xlim — Matplotlib 2.1.2 documentation
Get or set the x limits of the current axes. Setting limits turns autoscaling off for the x-axis. The new axis limits are...
Read more >
Xmin Xmax Ymin Ymax TI 84 - YouTube
Please consider donating to my GoFundMe via https://gofund.me/234e7370 | Without going into detail, the pandemic has not been good to me and ...
Read more >
Setting an axis in matplotlib - Stack Overflow
I use something like this: axis = fig.add_subplot(111, autoscale_on=False,xlim=(1,flen),ylim=(0,1). where flen is a amount that changes, and ...
Read more >
Set or query x-axis limits - MATLAB xlim - MathWorks
xlim( limits ) sets the x-axis limits for the current axes or chart. Specify limits as a two-element vector of the form [xmin...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found