Is there a way to have different font-sizes for X and Y axis using ChartJS.
scaleFontSize always applies to both axes.
I use the Y-axis with custom scaleLabel's which are LineIcons. I'd like to have those bigger while maintaining the size of the X-axis labels. A workaround will do as well.
Related
I have to place 4 spines on the same chart with different Y ratios, so I need to set up 4 Y-axes.
I have read the "muti-axis" demo from QT creator, it shows a example of two Y-axis and the two Y-axis are put on left and right side.
It's good when there is only two spines,
but when I have 4 spines, how to relocate the 4 Y axis?
Is it possible to place the 4 Y-axis at the tick point of X-axis? like the image below.
I used ChartJs2QML for displaying charts in QML.
Below is the approach I followed for multiple y axes. Maybe a similar approach can be adopted in Qt as well.
Show labels of all the y axes in the legend.
Show only one y axis by default. Hide all the other y axes.
On click of any y axes label in legend, hide the active y axis and show the clicked y axis.
Is it possible to create a figure with a grouped axis AND a RangeTool?
This example demonstrates the RangeTool https://docs.bokeh.org/en/latest/docs/gallery/range_tool.html.
I have a list of tuples factors which I want to use as a grouped axis:
[('2017','Jan'),('2017','Feb')..('2019','Oct')]
In the example, the initial pan on the plot seems to be set by x_range in
p = figure(plot_height=300, plot_width=800, tools="xpan", toolbar_location=None,
x_axis_type="datetime", x_axis_location="above",
background_fill_color="#efefef", x_range=(dates[1500], dates[2500]))
However, to use a grouped x axis, one must use FactorRange ala x_range=FactorRange(*factors). I've tried various forms of indexing of factors with FactorRange and cannot get it to work. Is such a thing possible in Bokeh?
The plot in here demonstrates an example of a grouped axis:
https://docs.bokeh.org/en/latest/docs/gallery/bar_mixed.html
The RangeTool assumes an underlying numeric axis, so there is not a direct way to accomplish this. The only route I could see would be to simulate a categorical axis by using a numerical axis with a fixed ticker and tick labels that correspond to the "categories" you want, and then to plot the bars using the corresponding numerical coordinates.
I'm developing a Qt5 application with QWidgets. I’m using QwtPlot from the Qwt-library for plotting live data in my tool. I'm setting my plot-axis to auto-scale via ui.qwtPlot->setAxisAutoScale(axis), because I want my plot to automatically adjust to the incoming data.
Now some clients are requesting the possibility, to have a plot with equally spaced axes x and y. I found QwtPlotRescaler, which seems to be the right thing for this purpose. I’ve successfully added it to my plot which now has equal axes if needed. (I can disable / enable this functionality by an additional button.)
However I noticed, that the auto-scale functionality is disabled, whenever I activate equal axes. With my dynamically incoming data, I would still like to have a rescaling plot. The axes should be automatically growing and shrinking, whenever the contents (items in the plot) change. So just like the normal autoscaling, but keeping the axes equal in the meantime. How can I archive this?
Do you need any additional information?
Thanks for your help!
Let's say your y axis should depend on the x axis, so that you always have a fixed aspect ratio for your coordinate system.
Then Qwt has to adjust the range of y axis and has to ignore the bounding interval of the data in y direction - there is no solution to do both.
What could be done is to add extra margins to the x axis, so that the range of the y axis grows according to the aspect ratio - finally including the bounding interval of the data. But finding good margins to achieve this is not implemented by QwtPlotRescaler.
But if it helps: all what the autoscaler does is to adjust the scales according to the boundingRect of the curves. You can also do this on your own, whenever you change your data.
I can't figure out why Google Charts draws this simple chart aligned to center and doesn't fill entire white area.
Note: X axis is discrete because it represents weeks.
Do you have any idea what can I do with it?
That is how the charts display when you use a discrete (string) axis. If you want edge-to-edge lines, you need to use a continuous (number, date, datetime, timeofday) axis. See an example of the differences here: http://jsfiddle.net/asgallant/Xfx3h/.
Below is url that chart I am using.
http://chart.apis.google.com/chart?cht=lc&chco=99C754&chs=400x150&chds=20,1&chd=t:1.0,1.0,1.0,1.0,1.0&chxt=x,y&chxl=0:|12/07/09|12/14/09|12/21/09|12/28/09|01/04/10&1:1|10|20&chxr=1,20,0,10&chls=2&chg=25,100,1,2&chm=o,54C7C5,0,-1,5&chxtc=1,15|0,15
I want to start y-axis from 1 but in my chart is started from 0.
please help me
little look at google
show :
Axis Range chxr :
You can specify the
range of values that appear on each
axis independently, using the chxr
parameter. Note that this does not
change the scale of the chart
elements, only the scale of the axis
labels. If you want to make the axis
numbers describe the actual data
values, set and
to the lower and upper values of your
data format range, respectively. See
Axis Scaling for more information.
You must make an axis visible using
the chxt parameter if you want to
specify its range.
To specify custom axis values, use the
chxl parameter.
http://code.google.com/intl/iw/apis/chart/docs/gallery/bar_charts.html#axis_range