Snippets Collections
const subMenuItems = (items) => {

    return items?.map((menu) => {

      return menu?.childMenus.length

        ? getItem(menu.name, menu.name, subMenuItems(menu?.childMenus))

        : getItem(

            <HashLink

              to={menu.URL}

              onClick={() => {

                if (

                  menu.name.toLowerCase() == MENU_TEXT.OFFERINGS.toLowerCase()

                ) {

                  removeOfferingFilter();

                } else if (

                  menu.name.toLowerCase() == MENU_TEXT.IPOS.toLowerCase()

                ) {

                  removeIpoFilter();

                }

              }}
            >
              {menu.name}

            </HashLink>,

            menu.name

          );

    });

  };
  @IBOutlet weak var barChartView: BarChartView!

 var productTypes = ["Aluminum Cans", "Plastic Bottles", "Paper Waste"]
 var productsCountArray = [Int]()

// viewDidLoad

   setBarChartView()   

// MARK: Chart View

extension FootPrintViewController {
 
    func setBarChartView() {
        productsCountArray.append(HomeViewController.aluminumItemRecycled)
        productsCountArray.append(HomeViewController.plasticBottleRecycled)
        productsCountArray.append(HomeViewController.otherItemsCount)
        
        
        barChartView.gridBackgroundColor = UIColor.clear
//        productsCountArray = [10, 12, 9]
        
        barChartView.drawValueAboveBarEnabled = true
        barChartView.animate(yAxisDuration: 1)
        
        barChartView.xAxis.granularity = 1
        barChartView.pinchZoomEnabled = true
        barChartView.drawBarShadowEnabled = false
        barChartView.drawBordersEnabled = false
        barChartView.doubleTapToZoomEnabled = false
        barChartView.drawGridBackgroundEnabled = true
        
        setBarChartData()
    }
    
    func setBarChartData() {
        barChartView.noDataText = "No Data available for Chart"
        
        barChartView.xAxis.valueFormatter = IndexAxisValueFormatter(values:productTypes)

        barChartView.leftAxis.granularity = 1
        barChartView.rightAxis.granularity = 1

        var dataEntries: [BarChartDataEntry] = []
        for i in 0..<productTypes.count {
           let dataEntry = BarChartDataEntry(x: Double(i), y: Double(productsCountArray[i]))
           dataEntries.append(dataEntry)
        }
        
        
        let chartDataSet = BarChartDataSet(entries: dataEntries, label: "Bar Chart")
        chartDataSet.colors = [.systemGreen, .red , .systemBlue]
        
        
        
        let chartData = BarChartData(dataSet: chartDataSet)
        barChartView.data = chartData
    }
}
// Color Animated Announcement Bar //

[data-header-theme] .sqs-announcement-bar-dropzone .sqs-announcement-bar {
  background: linear-gradient(99deg,#0d7d88,#708090,#add8e6);
  background-size: 400% 400%;
  -webkit-animation: AnimationName 6s ease infinite;
  -moz-animation: AnimationName 6s ease infinite;
  animation: AnimationName 6s ease infinite;
}

// Animation Keyframes - Do Not Edit or Delete //

@-webkit-keyframes AnimationName { 0% { background-position: 0% 51% } 50% { background-position: 100% 50% } 100% { background-position: 0% 51% } }

@-moz-keyframes AnimationName { 0% { background-position: 0% 51% } 50% { background-position: 100% 50% } 100% { background-position: 0% 51% } }

@keyframes AnimationName { 0% { background-position: 0% 51% } 50% { background-position: 100% 50% } 100% { background-position: 0% 51% } }

@-webkit-keyframes AnimationName { 0% { background-position: 0% 49% } 50% { background-position: 100% 52% } 100% { background-position: 0% 49% } }

@-moz-keyframes AnimationName { 0% { background-position: 0% 49% } 50% { background-position: 100% 52% } 100% { background-position: 0% 49% } }

@keyframes AnimationName { 0% { background-position: 0% 49% } 50% { background-position: 100% 52% } 100% { background-position: 0% 49% } }
.sqs-announcement-bar {

  overflow: hidden;

}

.sqs-announcement-bar-text {

  -moz-transform: translateX(100%);

  -webkit-transform: translateX(100%);

  transform: translateX(100%);

  -moz-animation: scroll 15s linear infinite;

  -webkit-animation: scroll 15s linear infinite;

  animation: scroll 15s linear infinite;

}

@-moz-keyframes scroll {

  from { -moz-transform: translateX(100%); }

  to { -moz-transform: translateX(-100%); }

}

@-webkit-keyframes scroll {

  from { -webkit-transform: translateX(100%); }

  to { -webkit-transform: translateX(-100%); }

}

@keyframes scroll {

  from {

    -moz-transform: translateX(100%);

    -webkit-transform: translateX(100%);

    transform: translateX(100%);

  }

  to {

    -moz-transform: translateX(-100%);

    -webkit-transform: translateX(-100%);

    transform: translateX(-100%);

  }

}

.sqs-announcement-bar-close {display:none}

.sqs-announcement-bar-text a {
    text-decoration: none !important;
}
.sqs-announcement-bar {
  padding: 10px;
}
star

Tue Apr 04 2023 14:01:45 GMT+0000 (Coordinated Universal Time)

#d3 #react #meteor #3d #bar #antd
star

Tue Jan 03 2023 06:16:48 GMT+0000 (Coordinated Universal Time)

#ios #swift #barchart #bar #chart
star

Wed Apr 20 2022 13:24:40 GMT+0000 (Coordinated Universal Time) https://www.ghostplugins.com/steps/color-animated-announcement-bar

#announcement #bar #animation #colour
star

Tue Dec 28 2021 14:20:32 GMT+0000 (Coordinated Universal Time) https://insidethesquare.co/squarespace-tutorials/scrolling-announcement-bar

#announcement #bar #scrolling #underline #link-text
star

Mon Nov 29 2021 07:13:59 GMT+0000 (Coordinated Universal Time)

#announcement #bar #padding

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension