def marshall(self, proto_chart): """Load this chart data into that proto_chart.""" proto_chart.type = case_converters.to_upper_camel_case(self._type) data_frame_proto.marshall_data_frame(self._data, proto_chart.data) proto_chart.width = self._width proto_chart.height = self._height self._append_missing_data_components() for component in self._components: proto_component = proto_chart.components.add() component.marshall(proto_component) for (key, value) in self._props: proto_prop = proto_chart.props.add() proto_prop.key = case_converters.to_lower_camel_case(key) proto_prop.value = value
def marshall(self, proto_component): proto_component.type = case_converters.to_upper_camel_case(self._type) for (key, value) in self._props: proto_prop = proto_component.props.add() proto_prop.key = case_converters.to_lower_camel_case(key) proto_prop.value = value