Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

org.webjars.bower:highcharts-chart

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org.webjars.bower:highcharts-chart

WebJar for highcharts-chart

  • 2.0.1
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

<highcharts-chart> Bower version Published on webcomponents.org

Web Component wrapper to the Highcharts Graphing Library, to create a multitude of graphs/maps (spline, pie, and more) using Polymer 1.0.

Demo

You can see a Realtime/Resonsive demo live! With a Tutorial Icon in the top right.

Install

Install the component using Bower:

$ bower install highcharts-chart --save

Or download as ZIP.

Usage

  1. Import Web Components' polyfill, on older browsers:

    <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
    
  2. Import Custom Element:

    <link rel="import" href="bower_components/highcharts-chart/highcharts-chart.html">
        OR
    <link rel="import" href="bower_components/highcharts-chart/highcharts-map.html">
        OR
    <link rel="import" href="bower_components/highcharts-chart/highcharts-stock.html">
    
  3. Start using it!

    <highcharts-chart type="spline" data='[[0,0],[1,7],[2,1],[3,6],[4,8],[5,6]]' title='Test-Spline Chart' x-zoom x-label="Iterations" y-label="Awesomeness Index"></highcharts-chart>
    
    Other Examples
    <highcharts-chart type="pie"></highcharts-chart>
    <highcharts-chart type="column"></highcharts-chart>
    <highcharts-map></highcharts-map>
    <highcharts-stock></highcharts-stock>
    

<highcharts-chart>

Provides you a simple interface to interact with the HighCharts API, with extensive Data Binding. The charting is also responsive.

Options

AttributeOptionsDefaultDescription
typespline,pie,columnsplinePick type of chart
titlestringHighcharts ChartTitle of Chart
subtitlestring""Subtitle of Chart
xAxisobject{} OR Time basedSpecifies the configuration for the X-Axis.
yAxisobject{}Specifies the configuration for the Y-Axis.
xLabelstringX-AxisLabel for X-Axis
yLabelstringY-AxisLabel for Y-Axis
xZoombooleanfalseZooming Allowed On X-Axis
yZoombooleanfalseZooming Allowed On Y-Axis
labelstringLabel[for non numeric]Alias for both Axis
dataarray[]Data for chart [data for Series 1 OR array of series]
loadingbooleanfalseToggle loading overlay on chart
loadingMessagestringLoading...Loading Text Display
selectedboolean [readonly]falseIs any element selected on graph
selectedPointsarray [readonly][]Which elements are selected
vsTimebooleanfalseSet all options appropriate for a time chart
chartOptionsobject{}Override/Add Properties for your type of chart
exportbooleanfalseEnable exporting of chart
legendbooleanfalseDisplay the legend
colorByPoint*booleanfalseEvery point treated/colored uniquely
creditsbooleanfalseWish to thank/credit HighCharts?
legendOptionsobject{}Override/Add Options to your legend
tooltipOptionsobject{}Override/Add Options to your tooltip
highchartOptionsobject{}Override/Add Options to the chart initalization code [useful for custom charts]
height-responsiveAttributeNAMake chart height responsive [define container height for this to work]
rendererobject [readonly]{}Allows direct access to the Highcharts rendering layer in order to draw primitive shapes like circles, rectangles,paths or text directly on a chart, or independent from any chart.
_chartobject [readonly]{}HighCharts exposed object

Note:

  • The * annotated properties above are not available in the highcharts-map element
  • If you bind a bunch of series objects to the data property instead of data for a single series, it will perform series level binding

Methods

MethodParametersDescription
setData(data,z=0)Data Array,Series IndexReplaces series data with the passed array
addData(x,y,z,drill)x,y,index,drillable?Appends to data [efficient]
pushData(x,y,z)x,y,indexShifts and adds to data [efficient]
addSeries(name,data,colorByPoint,otherOptions)String,Array,boolean,{}Adds a new Series to Plot
addDrillSeries(point,data,name)point,Array,StringAdds a series that is viewable when an Element is clicked into
getSeries(z=0)indexFetch a series [given by z], else return a dummy object
updateSeries(k,v,z)String,Mixed,0Modifies an option by Key Value for series [given by z]
updateSeries(options,z){},0Modifies the options for series [given by z]
removeSeries(z,redraw)index,trueRemoves Series denoted by index [should redraw after remove]
showLoading(t)*t [Text]Sets Loading-Message equal to t then turns on loading screen
resizeChart()noneEfficient reflow of the chart to parent [can be attached to a parent resize]
resizeChartFixed()noneFixed Adjustment of chart [use if chart should not fluctuate over minor size changes]
zoomOut()noneZoom out the chart
reRender()noneWill force a complete re-render of the Highchart [use it when binding is not possible]
downloadAs(name,options)chart,{}Download/Export the chart as a file
destroy()noneFree's up the memory used by the chart [prevents memory leaks]

Note: The * annotated methods above are not available in the highcharts-map element

Events

EventDescriptionPayload [e.detail]
chart-clickClick event on charte [original event], chart [chart object], component [self]
chart-loadFired when chart loadede, chart, component
before-printFired before chart printe, chart, component
after-printFired after chart printe, chart, component
series-addedFired when series addede, chart, component
drill-downFired when drill down is triggerede, chart, component
drill-upFired when drill up is triggerede, chart, component
drill-up-allIn a chart with multiple drilldown series, this event fires after all the series have been drilled upe, chart, component
selectionFired when a range of points are selectede, chart, component
redrawFires when the chart is redrawne, chart, component
renderFires after initial load of the chart, and after each redrawe, chart, component

Styling

MixinDescription
--highcharts-min-heightMin Height for Highcharts-Chart container [default: 26em]
--highcharts-containerThe container that directly contains the Chart SVG

Contributing/Suggestions

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

License

MIT License © Apoorv Verma

LinkedIn

FAQs

Package last updated on 23 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc