logo
  • Mercado
  • Dashboard
    Novo
  • Ações
  • Cotações
  • Screener
  • Heatmap
  • FIIs
  • Cotações
  • Screener
  • Rendimentos
  • Renda Fixa
  • Tesouro Direto
  • CDB / LCI / LCA
  • Debêntures
  • Curva de Juros
  • Derivativos
  • Opções
  • Futuros
  • Câmbio
  • Visão Geral
  • Book de Ofertas
  • Minhas Cotações
  • Fundos
  • Todos os Fundos
  • Screener
  • Economia
  • Indicadores Macro
  • Boletim Focus
  • Calendário Econômico
  • Portfólio
  • Minha Carteira
  • Watchlist
  • Alertas
  • Compras Públicas
  • Licitações
  • Buscar
  • Minhas Licitações
  • Pregão ao Vivo
  • Contratos
  • Atas de Preço
  • Dashboard Gov
  • BI & Analytics
  • Dashboards BI
  • Relatórios
  • Ferramentas
  • Notícias
  • Chat
  • Assban Pulso AI
    Beta
  • Calculadoras
  • IR Investimentos
  • Taxa Líquida
  • Preço Médio
  • Simulador Tesouro
  • Gráficos
  • Line
  • Candlestick
  • Doughnut & Pie
  • Gauge
  • Configurações
  • Meu Perfil
  • Configurações
  • API Keys
  • Certificado Digital
  • Ajuda
Usuário
Assban Pulso

Line Chart

  1. Home

  2. Line Chart

breadcrumbImg
Line Chart

Sample Code

"use client"
import dynamic from "next/dynamic";
const Chart = dynamic(() => import("react-apexcharts"), { ssr: false });
import { useTheme } from "@mui/material/styles";
import React from "react";

const BCrumb = [
  {
    to: "/",
    title: "Home",
  },
  {
    title: "Line Chart",
  },
];

const LineChart = () => {
  // chart color
  const theme = useTheme();
  const primary = theme.palette.primary.main;
  const secondary = theme.palette.secondary.main;

  const optionslinechart = {
    chart: {
      height: 350,
      type: "line",
      fontFamily: "'Plus Jakarta Sans', sans-serif",
      foreColor: "#adb0bb",
      zoom: {
        type: "x",
        enabled: true,
      },
      toolbar: {
        show: false,
      },
      shadow: {
        enabled: true,
        color: "#000",
        top: 18,
        left: 7,
        blur: 10,
        opacity: 1,
      },
    },
    xaxis: {
      categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"],
      title: {
        text: "Month",
      },
    },
    grid: {
      show: false,
    },
    colors: [primary, secondary],
    dataLabels: {
      enabled: true,
    },
    stroke: {
      curve: "straight",
      width: "2",
    },
    legend: {
      position: "top",
      horizontalAlign: "right",
      floating: true,
      offsetY: -25,
      offsetX: -5,
    },
    tooltip: {
      theme: "dark",
    },
  };
  const serieslinechart = [
    {
      name: "High - 2013",
      data: [28, 29, 33, 36, 32, 32, 33],
    },
    {
      name: "Low - 2013",
      data: [12, 11, 14, 18, 17, 13, 13],
    },
  ];

    return (
        <Chart
          options={optionslinechart}
          series={serieslinechart}
          type="line"
          height="308px"
          width={"90%"}
        />
    );
};

export default LineChart;