mirror of
https://github.com/towfiqi/serpbear
synced 2025-06-26 18:15:54 +00:00
fix: Resolves incorrect search trend graph in Ideas section.
closes #219
This commit is contained in:
parent
4b8730e416
commit
7597210ca2
@ -7,10 +7,11 @@ ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Filler,
|
|||||||
type ChartProps ={
|
type ChartProps ={
|
||||||
labels: string[],
|
labels: string[],
|
||||||
sreies: number[],
|
sreies: number[],
|
||||||
noMaxLimit?: boolean
|
noMaxLimit?: boolean,
|
||||||
|
reverse?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const ChartSlim = ({ labels, sreies, noMaxLimit = false }:ChartProps) => {
|
const ChartSlim = ({ labels, sreies, noMaxLimit = false, reverse = true }:ChartProps) => {
|
||||||
const options = {
|
const options = {
|
||||||
responsive: true,
|
responsive: true,
|
||||||
maintainAspectRatio: false,
|
maintainAspectRatio: false,
|
||||||
@ -18,7 +19,7 @@ const ChartSlim = ({ labels, sreies, noMaxLimit = false }:ChartProps) => {
|
|||||||
scales: {
|
scales: {
|
||||||
y: {
|
y: {
|
||||||
display: false,
|
display: false,
|
||||||
reverse: true,
|
reverse,
|
||||||
min: 1,
|
min: 1,
|
||||||
max: noMaxLimit ? undefined : 100,
|
max: noMaxLimit ? undefined : 100,
|
||||||
},
|
},
|
||||||
|
@ -61,7 +61,7 @@ const KeywordIdea = (props: KeywordIdeaProps) => {
|
|||||||
onClick={() => showKeywordDetails()}
|
onClick={() => showKeywordDetails()}
|
||||||
className={`keyword_visits text-center hidden mt-4 mr-5 ml-5 cursor-pointer
|
className={`keyword_visits text-center hidden mt-4 mr-5 ml-5 cursor-pointer
|
||||||
lg:flex-1 lg:m-0 lg:ml-10 max-w-[70px] lg:max-w-none lg:pr-5 lg:flex justify-center`}>
|
lg:flex-1 lg:m-0 lg:ml-10 max-w-[70px] lg:max-w-none lg:pr-5 lg:flex justify-center`}>
|
||||||
{chartData.labels.length > 0 && <ChartSlim labels={chartData.labels} sreies={chartData.sreies} noMaxLimit={true} />}
|
{chartData.labels.length > 0 && <ChartSlim labels={chartData.labels} sreies={chartData.sreies} noMaxLimit={true} reverse={false} />}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='keyword_ctr text-center inline-block ml-4 lg:flex mt-4 relative lg:flex-1 lg:m-0 justify-center'>
|
<div className='keyword_ctr text-center inline-block ml-4 lg:flex mt-4 relative lg:flex-1 lg:m-0 justify-center'>
|
||||||
|
Loading…
Reference in New Issue
Block a user