Rerun C++ SDK
|
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 a Collection<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 (const BarChart &other)=default | |
BarChart & | operator= (const BarChart &other)=default |
BarChart & | operator= (BarChart &&other)=default |
BarChart (rerun::components::TensorData _values) | |
BarChart | with_values (const rerun::components::TensorData &_values) && |
The values. Should always be a 1-dimensional tensor (i.e. a vector). | |
BarChart | with_many_values (const Collection< rerun::components::TensorData > &_values) && |
This method makes it possible to pack multiple values in a single component batch. | |
BarChart | with_color (const rerun::components::Color &_color) && |
The color of the bar chart. | |
BarChart | with_many_color (const Collection< rerun::components::Color > &_color) && |
This method makes it possible to pack multiple color in a single component batch. | |
Collection< ComponentColumn > | columns (const Collection< uint32_t > &lengths_) |
Partitions the component data into multiple sub-batches. | |
Collection< ComponentColumn > | columns () |
Partitions the component data into unit-length sub-batches. | |
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> . | |
static BarChart | update_fields () |
Update only some specific fields of a BarChart . | |
static BarChart | clear_fields () |
Clear all the fields of a BarChart . | |
Public Attributes | |
std::optional< ComponentBatch > | values |
The values. Should always be a 1-dimensional tensor (i.e. a vector). | |
std::optional< ComponentBatch > | color |
The color of the bar chart. | |
Static Public Attributes | |
static constexpr const char | IndicatorComponentName [] = "rerun.components.BarChartIndicator" |
static constexpr const char | ArchetypeName [] = "rerun.archetypes.BarChart" |
The name of the archetype as used in ComponentDescriptor s. | |
static constexpr auto | Descriptor_values |
ComponentDescriptor for the values field. | |
static constexpr auto | Descriptor_color |
ComponentDescriptor for the color field. | |
Archetype: A bar chart.
The x values will be the indices of the array, and the bar heights will be the provided values.
|
inline |
This method makes it possible to pack multiple values
in a single component batch.
This only makes sense when used in conjunction with columns
. with_values
should be used when logging a single row's worth of data.
|
inline |
This method makes it possible to pack multiple color
in a single component batch.
This only makes sense when used in conjunction with columns
. with_color
should be used when logging a single row's worth of data.
Collection< ComponentColumn > rerun::archetypes::BarChart::columns | ( | const Collection< uint32_t > & | lengths_ | ) |
Partitions the component data into multiple sub-batches.
Specifically, this transforms the existing ComponentBatch
data into ComponentColumn
s instead, via ComponentBatch::partitioned
.
This makes it possible to use RecordingStream::send_columns
to send columnar data directly into Rerun.
The specified lengths
must sum to the total length of the component batch.
Collection< ComponentColumn > rerun::archetypes::BarChart::columns | ( | ) |
Partitions the component data into unit-length sub-batches.
This is semantically similar to calling columns
with std::vector<uint32_t>(n, 1)
, where n
is automatically guessed.
|
staticconstexpr |
ComponentDescriptor
for the values
field.
|
staticconstexpr |
ComponentDescriptor
for the color
field.