Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::archetypes::BarChart Struct Reference

Archetype: A bar chart. More...

#include <rerun/archetypes/bar_chart.hpp>

Public Types

using IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName >
 Indicator component, used to identify the archetype when converting to a list of components.
 

Public Member Functions

 BarChart (rerun::datatypes::TensorBuffer buffer)
 
 BarChart (Collection< uint8_t > u8)
 Construct a BarChart from a Collection<uint8_t>.
 
 BarChart (Collection< uint16_t > u16)
 Construct a BarChart from a Collection<uint16_t>.
 
 BarChart (Collection< uint32_t > u32)
 Construct a BarChart from a Collection<uint32_t>.
 
 BarChart (Collection< uint64_t > u64)
 Construct a BarChart from a Collection<uint64_t>.
 
 BarChart (Collection< int8_t > i8)
 Construct a BarChart from a Collection<int8_t>.
 
 BarChart (Collection< int16_t > i16)
 Construct a BarChart from a Collection<int16_t>.
 
 BarChart (Collection< int32_t > i32)
 Construct a BarChart from a Collection<int32_t>.
 
 BarChart (Collection< int64_t > i64)
 Construct a BarChart from a Collection<int64_t>.
 
 BarChart (Collection< rerun::half > f16)
 Construct aBarChartfrom aCollection<half>`.
 
 BarChart (Collection< float > f32)
 Construct a BarChart from a Collection<float>.
 
 BarChart (Collection< double > f64)
 Construct a BarChart from a Collection<double>.
 
 BarChart (BarChart &&other)=default
 
 BarChart (rerun::components::TensorData _values)
 
BarChart with_color (rerun::components::Color _color) &&
 The color of the bar chart.
 

Static Public Member Functions

static BarChart u8 (Collection< uint8_t > u8)
 Construct a BarChart from a Collection<uint8_t>.
 
static BarChart u16 (Collection< uint16_t > u16)
 Construct a BarChart from a Collection<uint16_t>.
 
static BarChart u32 (Collection< uint32_t > u32)
 Construct a BarChart from a Collection<uint32_t>.
 
static BarChart u64 (Collection< uint64_t > u64)
 Construct a BarChart from a Collection<uint64_t>.
 
static BarChart i8 (Collection< int8_t > i8)
 Construct a BarChart from a Collection<int8_t>.
 
static BarChart i16 (Collection< int16_t > i16)
 Construct a BarChart from a Collection<int16_t>.
 
static BarChart i32 (Collection< int32_t > i32)
 Construct a BarChart from a Collection<int32_t>.
 
static BarChart i64 (Collection< int64_t > i64)
 Construct a BarChart from a Collection<int64_t>.
 
static BarChart f16 (Collection< rerun::half > f16)
 Construct a BarChart from a Collection<half>.
 
static BarChart f32 (Collection< float > f32)
 Construct a BarChart from a Collection<float>.
 
static BarChart f64 (Collection< double > f64)
 Construct a BarChart from a Collection<double>.
 

Public Attributes

rerun::components::TensorData values
 The values. Should always be a rank-1 tensor.
 
std::optional< rerun::components::Colorcolor
 The color of the bar chart.
 

Static Public Attributes

static constexpr const char IndicatorComponentName [] = "rerun.components.BarChartIndicator"
 

Detailed Description

Archetype: A bar chart.

The x values will be the indices of the array, and the bar heights will be the provided values.

Example

Simple bar chart

image

#include <rerun.hpp>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_bar_chart");
rec.spawn().exit_on_failure();
rec.log("bar_chart", rerun::BarChart::i64({8, 4, 0, 9, 1, 4, 1, 6, 9, 0}));
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:57

The documentation for this struct was generated from the following file: