Can we make specific grid lines invisible using Anychart Library? - anychart

I have created a chart using Anychart Library, I want to make the grid lines at 85 and 95 grades invisible.
When I am writing the following code statement it removes all lines from the chart:
chart.yGrid().enabled(false);
How can I remove specific lines from the grid?

It is possible to get rid of unwanted grid lines.
One of the ways you can achieve this is by specifying ticks on the Y axes.
In this way, you will specify desired values as ticks, and the corresponding grid lines will be adjusted accordingly:
// Set wanted ticks.
yScale.ticks().set([-1, 0, 2, 3, 4, 5]);
//Enable yGrid.
chart.yGrid().enabled(true)
Feel free to explore such method in a playground

Related

Can we disable/enable tooltip dynamically in Livecharts?

I am using Livecharts in wpf to generate a multiple line chart. The number of lines can be varied from 1 to 30.
For now, I have added a default tooltip which displays all the y-axis values of the current x-axis position where cursor is hovered. So when I have 36 lines in the chart, a larger tooltip is displayed and it does look bad.
So, can I know whether there is any approach which we can enable the tooltip only when the number of lines is lesser that 10 (for an example) and disable when it is above 10?
Thank you!

Can you set multiple paints on the same XYPlot?

So I have a working XYPlot but I want to add different colors to the background, not a single one. I know this appears to be doable for quadrants, but I want it basically row by row, or ranges of rows I should say.
Basically something like this :
but with ideally 3-4 colors instead of just 2. Can you set the background paint for a specified Axis range for example? I haven't found any info or way to do it yet.
IntervalMarker "Represents an interval to be highlighted in some way." In the example below, two markers span the plot's range.
XYPlot plot = new XYPlot(…);
plot.addRangeMarker(new IntervalMarker(.3, 1, new Color(0x60CCFFE5, true)));
plot.addRangeMarker(new IntervalMarker(0, .3, new Color(0x60FFCCE5, true)));

SSRS bar chart issue

I am trying to add one box and one line on x-axis. Please look at below bar chart.
I tried using stripline but I cannot set height for stripline. It goes till 100.
Is there any way I can do this?
Unfortunately, SSRS doesn't provide the functionality you're looking for. A stripline is the closest you can get to that, but like you said, you can't control its height. The only way you could simulate this behavior would be to use a Background Image for your stripline, but that may be more work than it's worth. It would require a lot of manual adjustment to get the image to line up on the chart.
I would add a series to the chart using the Stock chart (under Range). In the Series Properties I would set the High value to the height desired for your line (~52 in your example). Ideally this would come from a dataset value.
Set the Low, Open and Close values to 0.
Try two Stripe Lines. First, create the strip line which represents the vertical value you're after. In my case, I made one that was 50% of the graph height off of the Y-Axis.
Chart Properties:
Height of StripeLine:
Once the stripe line is the correct height for the chart, create a 'mask' stripe line along the X-axis that will cover the portion of the Y-axis line you want hidden.
Chart Propterites:
Width of Stripe Mask:
Using these methods, and some really clever expression writing, you should be able to make the line exactly as high, and as wide as you desire.

how to set wpf extended tookit chart line series as a top line series?

is there any way how to bring to the front any of displayed line series in my chart component?
I tried Focus(), but this do not work.
thanks
var series = (Series)chart.Series[0]; // you can replace 0 by a more appropriate index
series.SetValue(Panel.ZIndexProperty, 99);
I used an arbitrary value 99 for ZIndex, in reality you can use any value greater than 0.
Here is the official documentation on this property.

How to set axis line at bottom when all data 0 in jfreechart's bar chart?

I use Jfreechart's bar chart to show data. But in case all data is 0, the axis line will be displayed in middle of chart. I just want to display the axis line in bottom as usual cases.
How can I configure it? Thanks!
Assuming a DefaultCategoryDataset for example, use the clear() method when all values are sufficiently close to zero that you want to display no data. Alternatively, use setRangeWithMargins() when a specific range would be more meaningful.

Resources