Giter VIP home page Giter VIP logo

Comments (7)

netil avatar netil commented on May 14, 2024

@sibliss confirmed the issue. It seems like issuing on initializing, because after generation, do resize of the window or implicitly calling .resize() will be positioned well.

The generation code is like:

bb.generate({
	"data": {
		"columns": [
			["data1", 5, 10, 15]
		],
		"type": "bar"
	},
	"axis": {
		x: {
			type: "category",
			categories: ["text1", "text2", "text3"],
		},
		"rotated": true
	},
});

and the correct rendering should be :
image

For this moment, do

const chart = bb.generate(...);
chart.resize();

from billboard.js.

laurencedorman avatar laurencedorman commented on May 14, 2024

I see this issue is closed, does this mean that you regard it as fixed or is there another issue for it now? I am asking because I am using the most recent version of billboard and I have come across this problem

from billboard.js.

netil avatar netil commented on May 14, 2024

@laurencedorman, I'll try to check again

from billboard.js.

netil avatar netil commented on May 14, 2024

@laurencedorman, it's still happening?
with the latest, seems problem has been solved.

If you have any other issue rather than that or reproduction code, let me know for check.
For now, closing the issue.

from billboard.js.

rtmalone avatar rtmalone commented on May 14, 2024

I just confirmed this issue has reappeared in v1.2.0. I installed v1.0.1 and the issue corrected itself to center on the bar.

Correction: even downgrading to v1.0.1 didn't work for me.

export function composeGraphOptions(componentProps) {
  return { 
    bindto: `#${componentProps.chartID}`,
    data: {
      type: 'bar',
      groups: [componentProps.data[0]],
      rows: componentProps.data
    },
    padding: {
      top: 10
    },
    axis: {
      rotated: true,
      x: {
        type: 'category',
        categories: [
          'Voice',
          'Chat'
        ],
      },
      y: {
        show: false
      }
    },
    grid: {
    },
    legend: {
      show: false
    },
    svg: {
      classname: 'stacked-chart'
    },
    tooltip: {
      grouped: false,
    }
  }
}

screen shot 2018-02-08 at 1 23 07 pm

I'll use chart.resize() for now

from billboard.js.

fcodias avatar fcodias commented on May 14, 2024

Hi @netil, I think the problem is related with the legend attribute. This still happening when the legend attribute is false.

https://jsbin.com/cabemapudu/1/edit?html,js,output

from billboard.js.

netil avatar netil commented on May 14, 2024

@fcodias got it thanks.
It seems to have miscalculation with the legend occupied area.

from billboard.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.