Skip to content

Commit 7597210

Browse files
committed
fix: Resolves incorrect search trend graph in Ideas section.
closes #219
1 parent 4b8730e commit 7597210

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

components/common/ChartSlim.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Filler,
77
type ChartProps ={
88
labels: string[],
99
sreies: number[],
10-
noMaxLimit?: boolean
10+
noMaxLimit?: boolean,
11+
reverse?: boolean
1112
}
1213

13-
const ChartSlim = ({ labels, sreies, noMaxLimit = false }:ChartProps) => {
14+
const ChartSlim = ({ labels, sreies, noMaxLimit = false, reverse = true }:ChartProps) => {
1415
const options = {
1516
responsive: true,
1617
maintainAspectRatio: false,
1718
animation: false as const,
1819
scales: {
1920
y: {
2021
display: false,
21-
reverse: true,
22+
reverse,
2223
min: 1,
2324
max: noMaxLimit ? undefined : 100,
2425
},

components/ideas/KeywordIdea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const KeywordIdea = (props: KeywordIdeaProps) => {
6161
onClick={() => showKeywordDetails()}
6262
className={`keyword_visits text-center hidden mt-4 mr-5 ml-5 cursor-pointer
6363
lg:flex-1 lg:m-0 lg:ml-10 max-w-[70px] lg:max-w-none lg:pr-5 lg:flex justify-center`}>
64-
{chartData.labels.length > 0 && <ChartSlim labels={chartData.labels} sreies={chartData.sreies} noMaxLimit={true} />}
64+
{chartData.labels.length > 0 && <ChartSlim labels={chartData.labels} sreies={chartData.sreies} noMaxLimit={true} reverse={false} />}
6565
</div>
6666

6767
<div className='keyword_ctr text-center inline-block ml-4 lg:flex mt-4 relative lg:flex-1 lg:m-0 justify-center'>

0 commit comments

Comments
 (0)