@cfasim-ui/charts 0.7.5 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChoroplethMap/ChoroplethMap.d.ts +41 -2
- package/dist/ChoroplethMap/cityLayout.d.ts +89 -0
- package/dist/ChoroplethMap/cityLayout.test.d.ts +1 -0
- package/dist/LineChart/LineChart.d.ts +7 -0
- package/dist/_shared/chartProps.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1418 -1170
- package/dist/tooltip-position.test.d.ts +1 -0
- package/dist/us-cities/data.d.ts +2 -0
- package/dist/us-cities/index.d.ts +51 -0
- package/dist/us-cities/us-cities.test.d.ts +1 -0
- package/dist/us-cities.d.ts +1 -0
- package/dist/us-cities.js +1396 -0
- package/package.json +6 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { CityMarker } from '../ChoroplethMap/cityLayout.js';
|
|
2
|
+
import { usCities } from './data.js';
|
|
3
|
+
/**
|
|
4
|
+
* A US city record from the bundled Natural Earth dataset. `population` is an
|
|
5
|
+
* approximate estimate used only for ranking; it is never displayed.
|
|
6
|
+
*/
|
|
7
|
+
export interface UsCity {
|
|
8
|
+
/** City name, e.g. `"Austin"`. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** `[longitude, latitude]`. */
|
|
11
|
+
coordinates: [number, number];
|
|
12
|
+
/** Approximate population (Natural Earth `POP_MAX`), used for ranking. */
|
|
13
|
+
population: number;
|
|
14
|
+
/** 2-digit state FIPS code, e.g. `"48"` for Texas. */
|
|
15
|
+
stateFips: string;
|
|
16
|
+
/** 2-letter USPS abbreviation, e.g. `"TX"`. */
|
|
17
|
+
stateAbbr: string;
|
|
18
|
+
/** True for a state capital (or the national capital). */
|
|
19
|
+
capital: boolean;
|
|
20
|
+
/** True only for Washington, DC. */
|
|
21
|
+
nationalCapital: boolean;
|
|
22
|
+
}
|
|
23
|
+
export { usCities };
|
|
24
|
+
/** Options shared by the marker selectors. */
|
|
25
|
+
export interface CityMarkerOptions {
|
|
26
|
+
/** Maximum number of non-capital cities to include. */
|
|
27
|
+
limit?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Assign a per-city `minZoom` by population rank (default `true`) so cities
|
|
30
|
+
* reveal progressively as you zoom in. Set `false` for a flat layer where
|
|
31
|
+
* every city shares the map's `citiesMinZoom`.
|
|
32
|
+
*/
|
|
33
|
+
tiered?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Markers for the national map: Washington, DC (starred) plus the `limit`
|
|
37
|
+
* most-populous US cities as plain dots — state capitals are *not* starred at
|
|
38
|
+
* the national level, only DC is. Pass directly to `<ChoroplethMap :cities>`.
|
|
39
|
+
*
|
|
40
|
+
* By default (`tiered`) each city also gets a `minZoom` by population rank, so
|
|
41
|
+
* on a zoomable map the biggest cities show first and more reveal as you zoom
|
|
42
|
+
* in (the capital always shows). Pass `{ tiered: false }` for a flat layer.
|
|
43
|
+
*/
|
|
44
|
+
export declare function nationalCityMarkers(options?: CityMarkerOptions): CityMarker[];
|
|
45
|
+
/**
|
|
46
|
+
* Markers for a single-state map: that state's capital (starred) plus its
|
|
47
|
+
* most-populous cities, capital first. `stateFips` is the 2-digit FIPS code.
|
|
48
|
+
* Tiered by population like `nationalCityMarkers` (the capital always shows);
|
|
49
|
+
* pass `{ tiered: false }` to opt out.
|
|
50
|
+
*/
|
|
51
|
+
export declare function stateCityMarkers(stateFips: string, options?: CityMarkerOptions): CityMarker[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { usCities, nationalCityMarkers, stateCityMarkers, type UsCity, type CityMarkerOptions, } from './us-cities/index.js';
|