Is there a way to show the x-axis reference line till a particular y-axis value in recharts? - reactjs

I was using recharts to plot graphs in my react app. I wanted to achieve something like the picture below shows:
The only problem is that, I want the reference line to end at the point where green and blue lines in the picture, intersect. I just can't figure out how to stop the x-axis reference line to stop over-shooting about a certain y-axis value. Also, if there is a possibility to achieve the same with some other reacharts component, please do let me know.

Related

Does Recharts have anything that looks like this?

Does anyone know any js chart api's that have something like this or anny workarounds within recharts to implement this. Can't find anything useful in the documentation except radial bar charts but the way it is implemented is such that the biggest value it draws is a full ring, so plotting only a single value will always have a full ring instead of a changing percentage like i want?

Curved Line Charts

Is it possible to make the set the line charts to have curvature instead of straight lines?
I'm trying to get the desired curved line like the picture below.
It's impossible right now, but there is an issue for that https://github.com/tradingview/lightweight-charts/issues/506, so you can subscribe on it and/or provide additional information to the issue.

Victory Chart x-axis scale not working for Dates

I have an Area chart in Victory where the x-axis has dates.
I want to customize the x-axis Label and have created a CustomLabel component to calculate the x-axis scale and display "LABEL" below the ticks.
But for some reason, the scale is not calculated correctly for the Date Object.
Please let me know what I am doing wrong here.
Code here - https://codesandbox.io/s/3203z3n7r6
For anyone who may face this issue, I raised the issue in their Github Page and one of the authors has given a fix for it. Please see below:
https://github.com/FormidableLabs/victory/issues/1075

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.

Has anyone ever used a graph like this with Reactjs?

I want to visualize a data using graph, this is the sample graph that i want to use it.
I think the picture above is like time series graph types, data on the graph shows a random numbers in variety of time. If every data number is null or empty the graph is painting a full vertical red line.
My goal is to visualize a data like picture above, i already tried to use a different reactjs chart to visualize a data but can't
make if every data number is null or empty the graph is painting a full vertical red line like the picture.
Has anyone ever used a chart like the picture above?
It is better if you try Recharts. It is a compo-sable charting library for react components.

Resources