BarChart: color by field, x time field, bar radius, label skipping (#43257)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Leon Sorokin
2021-12-23 10:04:41 -08:00
committed by GitHub
co-authored by Ryan McKinley
parent 4233a62aeb
commit e75edc810d
12 changed files with 543 additions and 283 deletions
@@ -185,7 +185,13 @@ const timeUnitSize = {
};
/** Format time axis ticks */
function formatTime(self: uPlot, splits: number[], axisIdx: number, foundSpace: number, foundIncr: number): string[] {
export function formatTime(
self: uPlot,
splits: number[],
axisIdx: number,
foundSpace: number,
foundIncr: number
): string[] {
const timeZone = (self.axes[axisIdx] as any).timeZone;
const scale = self.scales.x;
const range = (scale?.max ?? 0) - (scale?.min ?? 0);