javafx barchart. set minimum width or height of each bar - javafx-2

I've created horizontal bar chart with category axis (Y axis). After adding more and more categories to Y axis, height of each horizontal bar is shrinked to zero size.
Here we can see bars with height of 2px, but I want to have at least 6px.
How to restrict height of each bar on the chart?
And how to force chart to request more space if bars for all categories are not fitted in plot area?

Each time you add a new category, increase the minHeight property of the chart.

Related

Legend size as a function of fig size matplotlib

I'm trying to make a 5x2 grid of 9 subplots and where the tenth subplot should be placed , I put the legend. To make this I get from the last subplot the legend handle (with ax.get_legend_handle()) and then I do:
ax = fig10.add_subplot(gs0[N_rows-1,N_cols-1])
ax.axis("off")
#h and l are the handles and the labels
ax.legend(h,l, borderaxespad=0, fontsize=50, title_fontsize=15)
The problem is that the legend doesn't occupy the whole figure and if I increase too much the font size of the labels, then it will generate an extra space between subplots. For that reason I want a way to set the size according to the height or the width of the current axis.

how to customize width as per label on #react-navigation/material-bottom-tabs

I had bottom bar I need it to be like that
but I can't update width for each item

Excel: can I set the label distance in x-axis based on its label number?

I have a graph in Excel like below. For the X-axis, the distance between 50 and 100 is the same as that between 100 and 200. Can I ask if I can set it based on the number? That is, the distance between 50 and 100, is half of that between 100 and 200.
Perhaps you can use a scatter plot rather than a line chart. The result looks something like this:
To generate the plot, I selected the whole data block and did Insert > Scatter with the subtype consisting of markers with straight-line segments. I don't know of any way to not show horizontal labels at 50, 100, 200 without doing things like 150, but at least the spacing is right. Obviously, the size, style, and color of the markers and lines are easy to tweak, as is the number and spacing of the horizontal grid lines.

jqPlot bar chart width

I currently have a bar chart in jquery. If the results show only 1 bar the issues is that the bar fills the space of the whole graph. How can I adjust the width of the bar so that it doesn't look like a log.
try setting the barWidth in the BarRenderer:
http://www.jqplot.com/docs/files/plugins/jqplot-barRenderer-js.html
If you still want your chart bars to size dynamically with number of bars / size of chart then use the barMargin and barPadding values to adjust the width of your bars.
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barPadding: 4,
barMargin: 5
},
The default values are 8 and 10 respectively so the above values will actually make your bar larger. Make the values larger than default to reduce the size of your bars.
barMargin is the width between bars. barPadding is the width between bars within a category if your bar chart is representing multiple series.
See http://www.jqplot.com/docs/files/plugins/jqplot-barRenderer-js.html for more info.

How to change axis value labels orientation?

I have a chart in Excel; I need to change orientation of text labels in one of the axis programmatically. Ideas?
This will change the orientation of the X-axis tick labels.
ActiveChart.Axes(xlCategory).TickLabels.Orientation = 45 ' degrees
This is how to change the orientation of the axis title:
ActiveChart.Axes(xlCategory).AxisTitle.Orientation = 81 ' degrees
Have you ever tried recording macros? If not, you should! Looking at the resulting code is a great way to quickly learn this type of thing.
Layout tab (which appears when you have a chart selected) -> labels -> axis titles.
or
Right click the chart axis -> format axis -> Alignment
or
VBA solution as Jean-François Corbett pointed out

Resources