Skip to content

Commit

Permalink
Change title [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
diegovalle committed Jun 6, 2024
1 parent 8d3441a commit b11862a
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 62 deletions.
136 changes: 75 additions & 61 deletions elcri.men/src/components/CrimeCharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { filter } from 'lodash-es'
import { dateLoc } from '../../src/i18n'
import { format } from 'd3-format'

import LazyLoad from 'react-lazyload'

import ReactEChartsCore from 'echarts-for-react/lib/core'
// Import the echarts core module, which provides the necessary interfaces for using echarts.
import * as echarts from 'echarts/core'
Expand Down Expand Up @@ -514,88 +516,100 @@ function CrimeChart(props) {
<div className="columns">
<div className="column is-full">
<figure className="image is-3by1-tablet-only-3by2-mobile-3by2">
<div
id="nat_hd"
style={{ height: '100%' }}
className={
props.selected_crime === 'hd'
? 'line-chart-brown has-ratio'
: 'line-chart-blue has-ratio'
}
>
{singleChart(intl.formatMessage({ id: 'Homicidio Intencional' }))}
</div>
<LazyLoad once offset={200}>
<div
id="nat_hd"
style={{ height: '100%' }}
className={
props.selected_crime === 'hd'
? 'line-chart-brown has-ratio'
: 'line-chart-blue has-ratio'
}
>
{singleChart(
intl.formatMessage({ id: 'Homicidio Intencional' })
)}
</div>
</LazyLoad>
</figure>
</div>
</div>

<div className="columns is-desktop">
<div className="column is-half-desktop">
<figure className="image is-3by2-tablet-only-3by2-mobile-3by1">
<div
id="nat_sec"
style={{ height: '100%' }}
className={
props.selected_crime === 'sec'
? 'line-chart-brown has-ratio'
: 'line-chart-blue has-ratio'
}
>
{singleChart(intl.formatMessage({ id: 'Secuestro' }))}
</div>
<LazyLoad once offset={200}>
<div
id="nat_sec"
style={{ height: '100%' }}
className={
props.selected_crime === 'sec'
? 'line-chart-brown has-ratio'
: 'line-chart-blue has-ratio'
}
>
{singleChart(intl.formatMessage({ id: 'Secuestro' }))}
</div>
</LazyLoad>
</figure>
</div>
<div className="column is-half-desktop">
<figure className="image is-3by2-tablet-only-3by2-mobile-3by1">
<div
id="nat_ext"
style={{ height: '100%' }}
className={
props.selected_crime === 'ext'
? 'line-chart-brown has-ratio'
: 'line-chart-blue has-ratio'
}
>
{singleChart(intl.formatMessage({ id: 'Extorsión' }))}
</div>
<LazyLoad once offset={200}>
<div
id="nat_ext"
style={{ height: '100%' }}
className={
props.selected_crime === 'ext'
? 'line-chart-brown has-ratio'
: 'line-chart-blue has-ratio'
}
>
{singleChart(intl.formatMessage({ id: 'Extorsión' }))}
</div>
</LazyLoad>
</figure>
</div>
</div>
<div className="columns is-desktop">
<div className="column is-half-desktop">
<figure className="image is-3by2-tablet-only-3by2-mobile-3by1">
<div
id="nat_rvcv"
style={{ height: '100%' }}
className={
props.selected_crime === 'rvcv'
? 'line-chart-brown has-ratio'
: 'line-chart-blue has-ratio'
}
>
{singleChart(
intl.formatMessage({ id: 'Robo de Coche c/v' }),
intl.formatMessage({ id: 'Robo de Coche Con Violencia' })
)}
</div>
<LazyLoad once offset={200}>
<div
id="nat_rvcv"
style={{ height: '100%' }}
className={
props.selected_crime === 'rvcv'
? 'line-chart-brown has-ratio'
: 'line-chart-blue has-ratio'
}
>
{singleChart(
intl.formatMessage({ id: 'Robo de Coche c/v' }),
intl.formatMessage({ id: 'Robo de Coche Con Violencia' })
)}
</div>
</LazyLoad>
</figure>
</div>
<div className="column is-half-desktop">
<figure className="image is-3by2-tablet-only-3by2-mobile-3by1">
<div
id="nat_rvsv"
style={{ height: '100%' }}
className={
props.selected_crime === 'rvsv'
? 'line-chart-brown has-ratio'
: 'line-chart-blue has-ratio'
}
>
{singleChart(
intl.formatMessage({ id: 'Robo de Coche s/v' }),
intl.formatMessage({ id: 'Robo de Coche Sin Violencia' })
)}
</div>
<LazyLoad once offset={200}>
<div
id="nat_rvsv"
style={{ height: '100%' }}
className={
props.selected_crime === 'rvsv'
? 'line-chart-brown has-ratio'
: 'line-chart-blue has-ratio'
}
>
{singleChart(
intl.formatMessage({ id: 'Robo de Coche s/v' }),
intl.formatMessage({ id: 'Robo de Coche Sin Violencia' })
)}
</div>
</LazyLoad>
</figure>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion elcri.men/src/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"name": "Diego Valle Jones",
"Please visit": "Si necesitan información delincuencial de la CDMX no se olviden de visitar <a href=\"https://hoyodecrimen.com/\">HoyoDeCrimen</a>",
"© All rights reserved": "© Todos los derechos reservados",
"Delincuencia en México - El Crimen": "El Crimen - Delincuencia en México, Inseguridad y Tasas de Crimen",
"Delincuencia en México - El Crimen": "El Crimen - Inseguridad y Delincuencia en México",
"desc_index": "Explora las estadísticas de la inseguridad en México con este mapa interactivo y un informe mensual de homicidios, secuestros, robo de autos y otros delitos",
"tasas de criminalidad": "tasas de criminalidad",
"inegi-adjusted": "<span class=\"inegi-adjusted\"><span class=\"has-text-weight-bold\">— </span><abbr title=\"datos de certificados de defunción\">INEGI</abbr> ajustados estadísticamente</span>",
Expand Down

0 comments on commit b11862a

Please sign in to comment.