I am using JFreeChart to make XYLineCharts with a Logarithmic y-axis but am facing an issue that I am unable to resolve.
My x, y values are very low in some cases (in one such case, the y-axis values for the dataset range between 4.5e-8 to 1.7). I plot these values on a XYLineChart using a Logarithmic Axis for the y-axis (and using LogAxis.createLogTickUnits(Locale.ENGLISH) and .setExpTickLabelsFlag(true) on the y-axis to create the exponential tick units). I set my range's bounds from 4.5e-8 to 1.7 and can see the points plotted clearly but there are no tick labels visible for the y-axis !
I was earlier having this issue while zooming into the charts but I have fixed the zoom & AutoZoom by over-riding those methods.
My current LogarithmicAxis works well for most of my x, y datasets but in a few cases, the y-axis is plotted but does not show any Tick Labels on it, despite my creating them & setting their visibility to true.
If anyone has any suggestions on how to fix this & ensure that the Tick Labels are visible no matter what the y-axis values may be, please let me know soon as I need to get this done ASAP.
Thanks.
Related
I'm using highcharts-react-official for a histogram with typescript. The problem I'm facing is, when user zooms in the values on the extreme of x-axis disappear (highlighted relevant x-axis values).
highchart
The zoom configurations that I'm using in Highcharts are something like this:
zoom on x-axis only
I did go through Highcharts documentation and some articles as well, but couldn't find any solution. If you have any previous experience in Highcharts then I'm sure you would be able to assist me here.
You are looking for cropThreshold property. From Highcharts API:
cropThreshold: number
When the series contains less points than the crop threshold, all
points are drawn, event if the points fall outside the visible plot
area at the current zoom. The advantage of drawing all points
(including markers and columns), is that animation is performed on
updates. On the other hand, when the series contains more points than
the crop threshold, the series data is cropped to only contain points
that fall within the plot area. The advantage of cropping away
invisible points is to increase performance on large series.
Defaults to 50.
You can increase the value:
plotOptions: {
series: {
cropThreshold: 9e9
}
}
Live demo: https://jsfiddle.net/BlackLabel/w6y4zdk8/
API Reference: https://api.highcharts.com/highcharts/series.column.cropThreshold
I am creating a horizontal bar chart using Victory that may get negative value and for that scenario i need the chart to draw on the -ve x axis .
some thing like below ---
But currently i am using version 33.0.5 and when I try with that version i see none of the bar charts draw in horizontal -ve x axis . Only when i degrade the version lower than 32.0.0 i get the charts draw on the -ve axis. Is there no way to achieve this in version 33.0.5 ? or any higher version . If yes what am i missing..
I tried doing in this sandbox, currently the dependency for victory is set at 32.0.0 in which we will see the -ve x axis is not draw try lowering it below that and you will see the math has -ve x axis value too .
How to get this behaviour in higher versions of victory chart
Forked your sandbox and tried to fix it.
https://codesandbox.io/s/victory-bar-chart-demo-forked-jf5gm
referred https://spectrum.chat/victory/general/stacked-bar-chart-with-negative-values-moving-horizontal-axis-labels-and-some-other-issues~6aec7554-208e-42fa-a310-ce6f780ef10d.
I currently have this issue where I am trying to hide the Y-axis of this line chart. Currently there is only the option to hide both axes in GDS.
Issue being is that the floating number at the y axis looks awkward.
Could anyone think of a work around? maybe hiding both axes and then creating a blank chart with the date values and using that as the x axis ticks.
One workaround is to draw a Shape or line over the axis and set it to a colour that blends in with the background, (although in the case above, it would cut into the first data point and data label) using Shift + movement keys for precision placement.
Google Data Studio Report as well as a GIF to elaborate:
I am trying to find Y-Axis value from X-Axis but so far no luck . My graph is plotted with 10-15 points with smooth curve set to true. Now what I need to locate is probable value of Y for any given x-value. Slimier to what occurs on click of graph (i think its nearest value displayed on tracker). Please note that I cant use tracker and click events. X-axis value will be provided from external input.
sample image
http://i.stack.imgur.com/jMwJo.png
I'm using the newest chart control from silverlight toolkit to plot some data. For small cases it works ok, but for bigger samples the X axis labels overlap. It would be no problem if the chart would simply omit some of the values or I could specify to just show every 10th of them ...
I couldn't find any properties providing this behavior. Any ideas?
Assuming this is a Linear axis then you can specify the interval to use via the the Interval property on the axis.
If the axis in question is Category Axis then dropping some labels may not be valuable to the user. One option is to use the LayoutTransfomer to rotate the labels to an angle reducing the width needed for each one. See this Delay Blog on the subject.