Did Morris.js Bar Chart change the bar width? - javascript

As Title.
I want to change the width of bar chart.
Like this http://imgur.com/W4mXw8W
Change to this http://imgur.com/GuD51aS
I search the document , but I cant Find the option to change it.
Any suggestion ?
Thanks

I know this is old bu this is what helped me in the same case as above:
barSizeRatio: 1

Related

Can I set full height bar background color in Echarts.js?

Can I set bar full height default background color in echarts.js like the attached image? I searched the options from their documentation Echarts bar documentation but unfortunately I couldn't find it. Please help me. by which option I can do it?
Add to series showBackground: true like in example: https://echarts.apache.org/examples/en/editor.html?c=bar-background

Drawing a horizontal line on a stacked bar chart on hover (chart js)

I have a stacked bar chart as follows:
I want to draw a horizontal line that goes through all the bars of a specific color on hover. Basically, if I hover on the following purple/mauve color, I want the following:
I looked alot in online as well as the documentation, but couldn't find anything.
Any help is really appreciated; thank you!
In theory you should be able to pre-render 5 line charts in addition to your stacked bar chart. Give each line chart a unique id or class html attribute, and each segment of a specific color needs a corresponding html classname, eg 'chartSegmentPurple' (actually it would be better to name the class based upon what the color represents, eg 'chartSegmentEconomicInequality'). Keep each line chart hidden. Give your chart an event listener for hover, then in the event handler get the classname. Use the classname to make visible the corresponding line chart.

Chartjs 2.5.0 -> Labels below the chart

I really need help because I can't find a workaround for my problem.
I just need the labels to be under the graph, like this (the default is on top):
I know there is the generateLabels() function, but with this I lost the click and hide/show function that I wanted and have with the defaults labels.
UPDATE
I find a "workaround", in version 2.5.0 , line 6713 -> change 'top' to 'bottom'. I know is not the ideal solution, but it works and is just what I need.
I find a "workaround", in version 2.5.0 , line 6713 -> change 'top' to 'bottom'. I know is not the ideal solution, but it works and is just what I need.
code printscreen
As per my thinking you can put label below your pie chart using legendTemplate
Here is fiddle : fiddle
then you can change your legend visualization as per your need.

add tooltip in stacked bar chart D3

Could you please help me in adding tooltip in stacked Bar chart. I have created Fiddle Link
i want to add tool tip on each bar chart ie. Each bar should show tool tip for each color. How can i do that.
> NA
Thanks in advance
You can append a title element under each rect and give it a text value of whatever you want the tooltip to say.
Here's a related question showing more details: How to add a tooltip to an svg graphic?
What exactly you want to show on tool tip? Is it data value or some text?
You can add
.append("svg:title")
.text(function(d){
return yourData;
}
});
This function should work for you and put the variable name where you are getting corresponding values of bars.

HighCharts: Getting rid of tooltip but mantain crosshairs

I'm using HighCharts, and I would like to use the crosshairs from the tooltip to help the user to hover a particular point. When the point is hovered I would like to show the information of that point in another div (that is done), but I would like to prevent the tooltip box to appears. Here is the "working" code: http://jsfiddle.net/Mw8WB/266/ . As you can see, I did a display:none in the tooltip, but there is a "circle" that is still there.
Appreciate any help :)
One of the tooltip options is formatter. It is a callback function to format the text of the tooltip. You can disable the tooltip by returning false from this function.
You can see the example here
http://jsfiddle.net/76LwZ/
and the documentation here
http://www.highcharts.com/ref/#tooltip

Categories

Resources