Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

125
Visualizações
netlify deployed victory chart don't display chart on iphone device

I deployed this repository to netlify and this url displayed my chart as expected on chrome with my macbook pro. however if I open the url, it display nothing. Actually, when I see victory chart official doc site, I can see the graphs both of devices. so I'm wondering why my site dosen't work on iphone.

画像の説明をここに入力

you can check my code on [my repo](this repository)

the essential part of the code is below.

import React from 'react';
import {
  StringOrNumberOrCallback,
  VictoryAxis,
  VictoryChart,
  VictoryLine,
} from 'victory';

const Chart: React.FC = () => {
  const profitHistoryList = [
    {
      datetime: '2021-12-31 00:00:00',
      cash: 10001.53,
      id: 57,
    },
    {
      datetime: '2022-01-03 00:00:00',
      cash: 10001.53,
      id: 58,
    },
    {
      datetime: '2022-01-18 00:00:00',
      cash: 9999.72,
      id: 59,
    },
    {
      datetime: '2022-01-19 00:00:00',
      cash: 9999.72,
      id: 60,
    },
  ];
  const data = profitHistoryList.map((p) => ({
    x: new Date(p.datetime),
    y: p.cash,
  }));

  const areaColor: StringOrNumberOrCallback =
    data[data.length - 1].y > 10000 ? 'green' : 'red';

  const { innerHeight: height } = window;

  return (
    <td className="w-40 md:w-full">
      <VictoryChart
        style={{
          background: { fill: 'black' },
        }}
        height={(height * 1) / 12}
        scale={{ x: 'time' }}
        padding={{ top: 10, left: 10, right: 10, bottom: 10 }}
      >
        <VictoryLine
          data={data}
          style={{
            data: {
              stroke: areaColor,
            },
          }}
        />
        <VictoryAxis dependentAxis style={{ axis: { stroke: 'none' } }} />
        <VictoryAxis style={{ axis: { stroke: 'none' } }} />
      </VictoryChart>
    </td>
  );
};

export default Chart;
import Position from 'Position';
import { VFC } from 'react';

import './App.css';
import './index.css';

const App: VFC = () => (
  <div className="App">
    <Position />
  </div>
);

export default App;
about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda