LLMS_Analytics_Courses::sales_chart( $search )


Description Description


Source Source

File: includes/admin/analytics/class.llms.analytics.courses.php

		public function sales_chart( $search ) {

			$headers = array( 'Date' );

			if ( $search ) {

				//add each course name to headers
				foreach ( $search->courses as $course ) {
					array_push( $headers, $course->post_title );
				}

				$total_students_by_day = LLMS_Analytics::get_total_enrolled_by_day( $search );

				array_unshift( $total_students_by_day, $headers );
			}

			$html = '<p class="llms-label">' . __( 'Student Enrollment', 'lifterlms' ) . '</p>';
			$html .= '<script>var enrolled_students = ' . json_encode( $total_students_by_day ) . '</script>';
			$html .= '<div id="curve_chart" class="llms-chart"></div>';

			return $html;
		}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.