mirror of
https://github.com/towfiqi/serpbear
synced 2025-06-26 18:15:54 +00:00
- Integrates Google Adwords API to generate keywords for a domain. - Adds a New Adwords Integration ui inside the App settings > Integrations screen to integrate Google Adwords. - Adds a New Ideas tab under each domain. - Adds ability to automatically generate keyword ideas based on website content, currently tracked keywords, Currently Ranking keywords or custom keywords - The Keyword Ideas are not saved in database, they are saved in a local file inside the data folder. File naming convention: IDEAS_domain.com.json - The keywords can be marked as favorites, and each time a keyword is favorited, they are added in the IDEAS_domain.com.json file.
51 lines
1.2 KiB
TypeScript
51 lines
1.2 KiB
TypeScript
import React from 'react';
|
|
import { Chart as ChartJS, CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend } from 'chart.js';
|
|
import { Line } from 'react-chartjs-2';
|
|
|
|
ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend);
|
|
|
|
type ChartProps ={
|
|
labels: string[],
|
|
sreies: number[],
|
|
reverse? : boolean,
|
|
noMaxLimit?: boolean
|
|
}
|
|
|
|
const Chart = ({ labels, sreies, reverse = true, noMaxLimit = false }:ChartProps) => {
|
|
const options = {
|
|
responsive: true,
|
|
maintainAspectRatio: false,
|
|
animation: false as const,
|
|
scales: {
|
|
y: {
|
|
reverse,
|
|
min: 1,
|
|
max: !noMaxLimit && reverse ? 100 : undefined,
|
|
},
|
|
},
|
|
plugins: {
|
|
legend: {
|
|
display: false,
|
|
},
|
|
},
|
|
};
|
|
|
|
return <Line
|
|
datasetIdKey='XXX'
|
|
options={options}
|
|
data={{
|
|
labels,
|
|
datasets: [
|
|
{
|
|
fill: 'start',
|
|
data: sreies,
|
|
borderColor: 'rgb(31, 205, 176)',
|
|
backgroundColor: 'rgba(31, 205, 176, 0.5)',
|
|
},
|
|
],
|
|
}}
|
|
/>;
|
|
};
|
|
|
|
export default Chart;
|