how to get slider line on x axis and y axis for Chart in codenameone - codenameone

I want two slider lines - one for x-axis and another for y-axis to show accurate result at any point in the line chart. As slider line move through the any axis it should display the crossing point values (display cross point values w.r.t. axis where slider line overlaps graph ) on the chart. Is there any method available for it ? If not how do I proceed for this ?

You can just place a horizontal and vertical slider next to the charts. However, I'm assuming you want to use them like a scrollbar?
You might prefer using gestures like drag and pinch to work with charts.

Related

How to hide axis bars in area chart and line chart in Google Data Studio

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:

How to move the x-axis labels on a datetime scale further from the edges?

I have this chart: https://playground.anychart.com/D7okDBpO/2
I would like the plot and x-axis labels to have some padding from the left and right edges (one of the reasons is that the last x-label is not even fully visible right now), similarly to how a chart with ordinal scale is rendered. For the plot I managed to do this with:
series.left(30);
series.right(30);
But I can't find a solution for the x labels. What I've tried:
// This doesn't work because it moves both first and last label
chart.xAxis().labels().offsetX(-30);
// This doesn't work because it moves all the labels, even the ones in the middle
chart.xAxis().labels().padding().left(50);
are you looking for this setting:
chart.left(20);
chart.right(20);
https://playground.anychart.com/miB1VAbq ?

Adding Line or separator to y axis in WPF Tool kit Line chart

I have added multiple Y axes to a single chart. Is it possible to add vertical lines in the LinearAxis and a scroll bar in below X axis? Please check out the image below:
How to handle the zoom and pan Functionality in the WPF Toolkit Chart?

Telerik bar chart x-axis with long texts

I'm trying the telerik bar chart in my mvc application. The texts on the x-axis labels can sometimes be very long and then they overlap.
How can i solve this? can i use a tooltip for this? and how to set the tooltip text for each bar?
Thanks in advance.
You can add a tooltip by adding Tooltip(true) like so:
Html.Telerik().Chart()
.Name("chart")
.Theme("vista")
.Series( series => series
.Bar( /*data*/)
.CategoryAxis( axis => axis
.Categories( /*data*/)
.Tooltip(true)
This will display the value of the Series (x-axis) on hover.
I know you can rotate the labels on the category axis by doing something like this:
.CategoryAxis( axis =>
{
axis.Categories( /*data*/ );
axis.Labels(labels => labels.Rotation(45));//this rotates 45 degrees (you can use whatever value you want)
}
but I don't think the Label method is available on the Series. You may consider flipping the Series and the Axis (if that would still make sense for your data). You may also consider formatting (abbreviating) the x-axis labels and adding your own legend.

Visiblox, WPF: Display labeled markers in a chart

is there a way to add some markers, like points or vertical lines with text labels to a visiblox chart?
Cheers,
Lutz
The premium version of Visiblox supports the concept of annotations; elements which are anchored to values on your X and/or Y axes. The Visiblox API supports the following annotations out-of-the-box:
Ellipse / circle
Rectangle / square
Lines (horizontal, vertical, point-to-point)
Text labels
Text labels anchored to datapoints (callout)
Annotations can be placed on the chart programmatically, and thereafter can be moved by the user via 'grippers'.
For a good idea of what is easily possible, see the following demo application:
http://www.visiblox.com/examples/Hindsight

Resources