class Playbook::PbGauge::Gauge

def chart_data_formatted

def chart_data_formatted
  chart_data.map { |hash| hash[:y] = hash.delete :value }
  chart_data
end

def chart_options

def chart_options
  {
    id: id,
    chartData: chart_data_formatted,
    circumference: full_circle ? [0, 360] : [-100, 100],
    dark: dark ? "dark" : "",
    disableAnimation: disable_animation,
    height: height,
    min: min,
    max: max,
    title: title,
    suffix: suffix,
    prefix: prefix,
    showLabels: show_labels,
    style: style,
    tooltipHtml: tooltip_html,
    type: "gauge",
    colors: colors,
  }.to_json.html_safe
end

def classname

def classname
  generate_classname("pb_gauge_kit")
end