I am implementing Histogram chart using react-plotlyjs. Graph is implemented but I have to draw the normal distribution curve using X and Y axis. I have the X axis but Y axis is automatically calculated for Frequency. So, I need the co-ordinates of X and Y axis to draw the normalization curve.
Also, I have to figure out like how can we calculate the frequency. I have to get the max of frequency. I cannot be able to share the data because I have a large number of records.
I am looking for the suggestions on this.
const trace1 = {
x: filteredXRecords,
type: "histogram",
histnorm: 'probability', //(Probability is used for Y axis)
showlegend: true,
marker: {
color: 'rgb(255,255,100)',
}
}
const data = [trace1]
<Plot
onClick={(data) => doubleClick(data)}
onRestyle={(data) => onRestyle(data)}
onSelected={( data ) => handleOnSelected( data ) }
id={graphName}
data={data}
layout={plotLayout}
style={plotStyle}
config={{ displaylogo: false }}
onRelayout={ ( data ) => handleRelayout( data )}
/>